-
Notifications
You must be signed in to change notification settings - Fork 531
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
Allow listening for events on SearchBox #2017
Labels
Comments
This was referenced Mar 1, 2017
Merged
Haroenv
added a commit
that referenced
this issue
Mar 20, 2017
<a name="3.2.2-beta0"></a> ## [3.2.2-beta0](v3.2.1...v3.2.2-beta0) (2017-03-20) ### Bug Fixes * **InfiniteHits:** provide translation key for `Load More` (#2048) ([6130bf2](6130bf2)) * **SearchBox:** better mobile behaviour by default ([ea968b3](ea968b3)) * **example:** link to instantsearch/react (#2007) ([5e674cd](5e674cd)) * **recipes:** react router v4 ([de673bf](de673bf)) ### Features * **SearchBox:** add role=search to the form (#2046) ([d1e90f3](d1e90f3)) * **SearchBox:** allow custom reset and submit components (#1991) ([cd303d7](cd303d7)) * **searchBox:** add event handling ([e267ab6](e267ab6)), closes [#2017](#2017)
Can we get this in the regular JS / non-react version of instantsearch? I'm trying to make #1450 (comment) happen but that solution won't work. I'm guessing because there is already a preventDefault in instantsearch.js |
Which events are you listening for? Could you list your use case you were thinking of in a new issue please so we don't forget about this in a closed issue @t0byman |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current SearchBox is not exposing any events while you may want to listen for them. The most obvious use case for now is being able to build an autocomplete menu reusing our SearchBox.
To solve this I propose to:
<form>
. They are standard DOM events. onSubmit: when hitting enter or clicking the magnifying glass icon. onReset: when clicking the clear icon (which is a button type=resetThe text was updated successfully, but these errors were encountered: