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): adds onSubmit callback and close handler #3500
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/uber-ui-platform/baseweb/nl10dnasa |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0a66b0a:
|
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.
should we add it to the typescript definition too?
Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #3501 |
Co-authored-by: UberOpenSourceBot <UberOpenSourceBot@users.noreply.github.com>
@chasestarr this is great! Any way we can pass the input value through to the |
closes https://github.com/uber/baseweb/issues/3492
Description
Adds a new
onSubmit
callback that will fire in the same step as a parent form element'sonSubmit
attribute. This callback includes acloseListbox
handler that can be used in response to pressing enter when not focused on a listbox option@jonsadka Take a look at the included
.scenario.js
file. I think this should do what you're looking for. Clicking on a separate button should already close the listbox. If that's not working for you, can you please share a repro?Scope
Minor: New Feature