shuashuai commented on code in PR #935:
URL: https://github.com/apache/incubator-answer/pull/935#discussion_r1590502468


##########
ui/src/pages/Questions/Ask/index.tsx:
##########
@@ -452,18 +448,18 @@ const Ask = () => {
                 {formData.content.errorMsg}
               </Form.Control.Feedback>
             </Form.Group>
+
             <Form.Group controlId="tags" className="my-3">
               <Form.Label>{t('form.fields.tags.label')}</Form.Label>
-              <Form.Control
-                defaultValue={JSON.stringify(formData.tags.value)}
-                isInvalid={formData.tags.isInvalid}
-                hidden
-              />

Review Comment:
   
![image](https://github.com/apache/incubator-answer/assets/30591202/29e06faa-1c1c-48f6-9524-7c1b5450dadb)
   
   Correct error message:
   
   
![image](https://github.com/apache/incubator-answer/assets/30591202/c9290f5d-3c36-4baa-b8bc-0c8b440f6eae)
   
   the tag error message is not displayed,there are several solutions: 
   1. TagSelector component adds `custom-form-control is-invalid` class name
   
![image](https://github.com/apache/incubator-answer/assets/30591202/dc6b6dd4-c716-4199-8bc1-0523068ec627)
   2. extend the component, put the error information of the component inside, 
and pass in the error information and status from props!
   
   I prefer the second option!
   
   
   
   
   
   



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

Reply via email to