-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(Combobox): allow custom value #14935
feat(Combobox): allow custom value #14935
Conversation
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
This works great! Thank you @tw15egan
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.
Looks great!
25231da
to
0ef61f2
Compare
384dca0
Closes #14006
Adds a new prop,
allowCustomValue
, that will retain the value typed into theCombobox
on blur, and allow the menu to be closed withEnter
when the value does not match an item in the list.Changelog
New
allowCustomValue
prop added toComboBox
so that a user can have their value retained onEnter
orBlur
if it does not match any item in the list.Changed
onChangeData
to account for this new use caseTesting / Reviewing
Go to the test story, and type in an item that is not in the item list. You should be able to accept this value with Enter, and it should stay in the
Combobox
when the focus is lost.