-
Notifications
You must be signed in to change notification settings - Fork 114
Add prop to mark field as required #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
mfrazie2
commented
Oct 22, 2021
•
edited
Loading
edited
- Add prop reference to README and interface
- Add storybook entry
- Add prop to mark field as required
* Add prop reference to README and interface * Add storybook entryAdd prop to mark field as required
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/srigar/multiselect-react-dropdown/BDJFgwyeKF9GhQuW2aTiAnkpCq88 |
There is no feedback provided to the end user they are missing information. Open to suggestions on the best way to do so. |
@@ -527,6 +527,7 @@ export class Multiselect extends React.Component<IMultiselectProps, any> { | |||
style={style['inputField']} | |||
autoComplete="off" | |||
disabled={singleSelect || disable} | |||
required={required} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding required in input doesn't help I believe, because input field will always be empty, after selecting any option we will clear the input field value. So it will always throw error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 Oh right. I jumped in without looking. I'll pull this back to a draft state and work on a different solution.
* Add validation message on field