[React] Multi-select combobox does not support keyboard selection + navigation
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v1.6.5
What browser are you using?
Chrome
Reproduction URL
Use playground-react locally (no changes necessary).
Describe your issue
Steps to reproduce
- Run playground-react locally
- Open multi-select combobox example in browser
- Tab into combobox
- Keyboard navigate to an unselected option
- Select option by pressing enter
- See option is selected (rendered as pill)
- Tab away from combobox
Expected behavior
The newly-selected option is preserved as a value.
Actual behavior
The newly-selected option is removed from the values.
Any updates on this issue?
Hey! Thank you for your bug report! Much appreciated! 🙏
This should be fixed by #1750, and will be available in the next release. We improved it by just closing the Combobox when using multiple mode without selecting/unselecting the active option.
You can already try it using:
npm install @headlessui/react@insiders.npm install @headlessui/vue@insiders.