Skip to content

Multi select option in useComboBox hook #2162

Answered by devongovett
devanSAGA asked this question in Q&A
Discussion options

You must be logged in to vote

Please see #2140. Multiple selection is not built in at the moment. One possibility is to handle selection events from the combobox yourself, add the item to a list you maintain in your own state, and render that yourself outside the combobox somewhere. If you make the combobox controlled you could also clear the input when selection occurs and the item is added to your own selection state.

On a side note, I was also curious about are react-aria and react-stately libraries tree-shakable?

Yes. It should work with any modern bundler. You can also choose to import each package individually (e.g. import {useComboBox} from '@react-aria/combobox' rather than import {useComboBox} from 'react-a…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@devanSAGA
Comment options

@devanSAGA
Comment options

@devongovett
Comment options

Answer selected by devanSAGA
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