headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

[React] Multi-select combobox does not support keyboard selection + navigation

Open what-is-a-crow opened this issue 4 years ago • 2 comments

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

  1. Run playground-react locally
  2. Open multi-select combobox example in browser
  3. Tab into combobox
  4. Keyboard navigate to an unselected option
  5. Select option by pressing enter
  6. See option is selected (rendered as pill)
  7. 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.

what-is-a-crow avatar Jun 29 '22 15:06 what-is-a-crow

Any updates on this issue?

ivaninja avatar Aug 02 '22 08:08 ivaninja

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.

RobinMalfait avatar Aug 09 '22 14:08 RobinMalfait