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:

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

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:
[email protected]