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

[BUG] - Cannot read properties of undefined (reading 'props') when rendering large user lists in Autocomplete #4478

Closed
Aryan-mor opened this issue Jan 2, 2025 · 2 comments

Comments

@Aryan-mor
Copy link

NextUI Version

2.6.8

Describe the bug

When using the Autocomplete component from @nextui-org/react with a large user list (e.g., 80+ items), an error is thrown:
Uncaught TypeError: Cannot read properties of undefined (reading 'props').
This issue occurs during the rendering of AutocompleteItem components.

Your Example Website or App

https://codesandbox.io/p/devbox/nostalgic-mccarthy-g9fsxd

Steps to Reproduce the Bug or Issue

  1. Import the Autocomplete, AutocompleteSection, AutocompleteItem, and Avatar components from @nextui-org/react.
  2. Create an array of user objects (e.g., 80+ items) with properties such as id, name, email, and avatar.
  3. Render the Autocomplete component with multiple AutocompleteSection elements, each containing AutocompleteItem components generated using users.map().
  4. Open the app and interact with the Autocomplete dropdown.

Expected behavior

The Autocomplete component should render all items without throwing errors and allow smooth scrolling through large lists.

Screenshots or Videos

No response

Operating System Version

Windows

Browser

Chrome

@wingkwong
Copy link
Member

duplicate - #4457. The fix is in progress. As a workaround, you may add isVirtualized={false} temporarily until the fix is released.

@wingkwong wingkwong closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2025
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