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

<Command.Empty> showing when using react-window and react-virtualized-autosizer #282

Open
BrendanC23 opened this issue Jul 12, 2024 · 2 comments

Comments

@BrendanC23
Copy link

Here's a CodeSandbox that demonstrates the issue.

I'm trying to virtualize cmdk using the react-window package. This works fine (see the "virtualized cmdk without autosize" demo). All of the elements are displayed properly. When FixedSizeList is used, I need to set the items to take up a certain height. If there are too few items, empty space will be rendered.

One fix for this is to use [react-virtualized-auto-sizer] (https://github.com/bvaughn/react-virtualized-auto-sizer), which will dynamically change the height. However, this causes the <Command.Item /> elements to no longer render, and instead the <Command.Empty /> element is shown. The "virtualized cmdk with autosize" demo shows "no items found".

@imyuanli
Copy link

imyuanli commented Aug 23, 2024

I have the same problem,do you have any solution?

@imyuanli
Copy link

I have currently solved it in a rather stupid way, but this still needs a real solution
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants