Skip to content

useComboBoxState with multiple selection #1637

Answered by snowystinger
asterikx asked this question in Q&A
Discussion options

You must be logged in to vote

Our combobox specifically only supports single selection because it is hard to show multi selection in a combobox. The component you shared shows it via a taglist and removes selected items from the combobox options. As such, when we build a similar component, we'll probably create a different hook that can handle multi selection.

You could also create your own tags and use the ComboBox in a controlled manner, handling onSelectionChange to reset the input value and add to the tags. We don't have a taglist component yet, so you'd need to follow the aria specs for layout grids yourself for that.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by snowystinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants