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:
us...@infra.apache.org


Reply via email to