pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.04k stars 259 forks source link

Limit number of displayed options #205

Open BrendanC23 opened 5 months ago

BrendanC23 commented 5 months ago

I have a combobox with several thousand items. Is there a straightforward way to only show the first N matches without needing to manually handle the filtering and displaying of the CommandItem elements?

teebu commented 5 months ago

i'd like to know too, seems that slicing the output removes them from further filtering.

pacocoursey commented 5 months ago

Currently, no. I'd like to add support for virtualization though, which is what you are wanting.

matthiasfeist commented 1 month ago

Does anyone know of a working demo how to combine CMDK with something like react-window for virtualisation?