Skip to content
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

Merged
merged 4 commits into from Jul 16, 2020

Conversation

chasestarr
Copy link
Collaborator

@chasestarr chasestarr commented Jul 16, 2020

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's onSubmit attribute. This callback includes a closeListbox 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

@vercel
Copy link

vercel bot commented Jul 16, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/uber-ui-platform/baseweb/nl10dnasa
✅ Preview: https://baseweb-git-combobox-on-search-callback.uber-ui-platform.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 16, 2020

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:

Sandbox Source
Basic usage Configuration

Copy link
Contributor

@gergelyke gergelyke left a 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?

@UberOpenSourceBot
Copy link
Collaborator

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>
@jonsadka
Copy link
Contributor

@chasestarr this is great!

Any way we can pass the input value through to the onSubmit callback also?

@vercel vercel bot temporarily deployed to Preview July 16, 2020 20:22 Inactive
@chasestarr chasestarr merged commit 0ed3288 into master Jul 16, 2020
@uber-baseweb-probots uber-baseweb-probots bot deleted the combobox-on-search-callback branch July 16, 2020 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants