You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/23 07:26:08 UTC

[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #1710: feat: duplicate upstream service consumer

LiteSun commented on a change in pull request #1710:
URL: https://github.com/apache/apisix-dashboard/pull/1710#discussion_r618998603



##########
File path: web/src/pages/Upstream/Create.tsx
##########
@@ -30,13 +30,19 @@ const Page: React.FC = (props) => {
   const [form1] = Form.useForm();
   const { formatMessage } = useIntl();
   const upstreamRef = useRef<any>();
+  const isDuplicate = (props as any).route.path.split('/').slice(-1)[0] === 'duplicate';
 
   useEffect(() => {
     const { id } = (props as any).match.params;
 
     if (id) {
       fetchOne(id).then((data) => {
         form1.setFieldsValue(data.data);
+        if (isDuplicate) {
+          form1.setFieldsValue({
+            'name': ''

Review comment:
       ```suggestion
               name: ''
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org