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

[Select] Using react-virtualized to render lists causes console warning #18795

Closed
2 tasks done
KelvinC2 opened this issue Dec 11, 2019 · 1 comment
Closed
2 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@KelvinC2
Copy link

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When there is a component that wraps the options in a Select component, a console warning will show saying that an out-of-range value was provided

Expected Behavior 🤔

There should not be a console warning

Steps to Reproduce 🕹

  1. Have a Select component with MenuItem children
  2. Wrap the MenuItem children with any other component (like a div), or use a react-virtualized List to render them.
  3. When the Select component gets a value from somewhere (i.e initial value), the console warning will appear

https://codesandbox.io/s/ecstatic-http-w8ukj

Context 🔦

Performance when using Select to render a large list is slow, so we are using react-virtualized to render all of the items. However, when we are rendering the items with the react-virtualized List, we see this error in our console.

Your Environment 🌎

Tech Version
Material-UI v4.7.0
React v16.12
Browser Chrome
TypeScript Yes
@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Dec 12, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 12, 2019

You can track these two issues in #17001 (slow) and #14943 (virtualization blocker).
I would encourage the usage of the native select everywhere possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants