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


##########
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:
   Understood!
   Thanks for explaining @shuashuai.
   
   But I have one concern about why we are putting 
```<Form.Control.Feedback>``` component inside our custom ```<TagSelector>```. 
Every component is following this structure ...
   
   ```
   <Form.Group controlId="tags" className="my-3">
     <Form.Label>title</Form.Label>                                // 
responsible for title of component
     <CustomComponent/>                                            // actual 
component
     <Form.Control.Feedback type="invalid">
       error                                                       // display 
error if any
     </Form.Control.Feedback>
   </Form.Group>
   ```
   
   If we follow the second approach for ```<TagSelector>```, then this 
structure is not followed. Should I make this change to all available 
components? Or, Can you tell me pros of following 2nd approach. Just want to 
get into details out of curiosity!



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