Choices
Choices copied to clipboard
Trigger changeQuery event when user inputs something into the search field
Description
This closes #944 by triggering a changeQuery event as soon as the user inputs something into the search field.
Types of changes
- [ ] Chore (tooling change or documentation change)
- [ ] Refactor (non-breaking change which maintains existing functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
This looks like a great addition, but right now it won't function as intended. A changeQuery event will be fired every time a key is pressed, even if it doesn't actually change the query (i.e. arrow keys, delete/backspace keys when the query box is empty, etc.). I think you want to hook into the input event instead. We aren't doing that already, so you'll need to add an _onInput method to Choices.
Please also rebase on the latest version of the master branch.