liuxiran commented on a change in pull request #2034:
URL: https://github.com/apache/apisix-dashboard/pull/2034#discussion_r684561419
##########
File path: web/src/components/Upstream/components/Type.tsx
##########
@@ -52,7 +52,7 @@ const CHash: React.FC<Pick<Props, 'readonly'>> = ({ readonly
}) => {
</Form.Item>
<Form.Item
name="key"
- rules={[{ required: true }]}
+ rules={[{ required: form.getFieldValue('hash_on') !== 'consumer' }]}
label={formatMessage({ id: 'component.upstream.fields.key' })}
Review comment:
it would be better to add `disabled` attr to `key` field when user
selected consumer, or hide this field is also a good choice
for when hash_on selected consumer, key will auto match current request's
consumer automatically no matter what user entered
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]