Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combobox virtualization #1127

Closed
gosvoh opened this issue Aug 6, 2023 · 5 comments
Closed

Combobox virtualization #1127

gosvoh opened this issue Aug 6, 2023 · 5 comments
Labels

Comments

@gosvoh
Copy link

gosvoh commented Aug 6, 2023

I needed to make a Combobox with a large number of items. For this I used react-virtualized and disabled filtering by making my own. For some reason CommandInput loses focus when trying to enter characters.

2023-08-06.19-30-21.webm

My CommandInput - https://github.com/gosvoh/biocon/blob/6baaab5869aaf10a0741256ff2b3213905f29f7a/src/app/registration.dialog.tsx#L432

Any idea how to fix this issue?

@oaarnikoivu
Copy link

@gosvoh I've managed to get virtualization working for the most part using TanStack virtual. You can have a look here in case it's useful for you: https://github.com/oaarnikoivu/shadcn-virtualized-combobox

@dih7
Copy link

dih7 commented Nov 8, 2023

@gosvoh Did you find a solution to this bug? I have something very similar happening to an input in a form.

I think it is causing the parent to re-render, and I can't figure out why. Even a html without any props loses focus within the Command element.

@garabedium
Copy link

@oaarnikoivu, were you able to get keyboard support for the combobox with react-virtual?

@oaarnikoivu
Copy link

@oaarnikoivu, were you able to get keyboard support for the combobox with react-virtual?

It currently doesn't support keyboard navigation, but I may look into adding it sometime soon

@shadcn shadcn added the Stale label Mar 1, 2024
@shadcn
Copy link
Collaborator

shadcn commented Jun 12, 2024

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

@shadcn shadcn closed this as completed Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants