juzhiyuan commented on a change in pull request #1089:
URL: https://github.com/apache/apisix-dashboard/pull/1089#discussion_r548441932



##########
File path: web/src/pages/Route/components/Step1/RequestConfigView.tsx
##########
@@ -388,15 +388,16 @@ const RequestConfigView: 
React.FC<RouteModule.Step1PassProps> = ({
         name='service_id'
       >
         <Select disabled={disabled}>
-          <Select.Option value=''>{}</Select.Option>
+          {/* NOTE value = '' mean no service_id select, need to find a better 
way */}

Review comment:
       1. `=` is used to set value 🤣🤣
   2. xx means
   3. TODO

##########
File path: web/src/pages/Route/service.ts
##########
@@ -104,4 +104,5 @@ export const fetchServiceList = () =>
   request('/services').then(({ data }) => ({
     data: data.rows,
     total: data.total_size,
-  }));
\ No newline at end of file
+  }));
+  

Review comment:
       
![image](https://user-images.githubusercontent.com/2106987/103073859-55026a80-4603-11eb-808d-89c6a984f63d.png)
   

##########
File path: web/src/pages/Route/components/Step1/RequestConfigView.tsx
##########
@@ -388,15 +388,16 @@ const RequestConfigView: 
React.FC<RouteModule.Step1PassProps> = ({
         name='service_id'
       >
         <Select disabled={disabled}>
-          <Select.Option value=''>{}</Select.Option>
+          {/* NOTE value = '' mean no service_id select, need to find a better 
way */}
+          <Select.Option value='' 
key={Math.random().toString(36).substring(7)} >{null}</Select.Option >

Review comment:
       Why use `null` here?

##########
File path: web/src/pages/Route/components/Step1/RequestConfigView.tsx
##########
@@ -388,15 +388,16 @@ const RequestConfigView: 
React.FC<RouteModule.Step1PassProps> = ({
         name='service_id'
       >
         <Select disabled={disabled}>
-          <Select.Option value=''>{}</Select.Option>
+          {/* NOTE value = '' mean no service_id select, need to find a better 
way */}
+          <Select.Option value='' 
key={Math.random().toString(36).substring(7)} >{null}</Select.Option >
           {serviceList.map(item => {
-            return <Select.Option value={item.id}>
+            return <Select.Option value={item.id} key={item.id}>
               {item.name}
             </Select.Option>
           })}
         </Select>
       </Form.Item>
-    </PanelSection>
+    </PanelSection >

Review comment:
       
![image](https://user-images.githubusercontent.com/2106987/103073875-5cc20f00-4603-11eb-9230-d13c53489efc.png)
   
   what's this?




----------------------------------------------------------------
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