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

Autocomplete: react-select demo contains error #17269

Closed
2 tasks done
ohlr opened this issue Sep 1, 2019 · 3 comments · Fixed by #17037
Closed
2 tasks done

Autocomplete: react-select demo contains error #17269

ohlr opened this issue Sep 1, 2019 · 3 comments · Fixed by #17037
Assignees
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation

Comments

@ohlr
Copy link
Contributor

ohlr commented Sep 1, 2019

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

Bug

https://material-ui.com/components/autocomplete/#react-select

this tutorial contains errors. Open the sandbox and click on a element in the list.

The following is logged to the console:

Warning: Failed prop type: The prop `innerProps.key` is marked as required in `Option`, but its value is `undefined`.
Warning: Failed prop type: The prop `innerRef` is marked as required in `Option`, but its value is `undefined`.

Link to sandbox: https://codesandbox.io/s/dcgb1

Tested on Linux in Chrome and Firefox

@eps1lon eps1lon added bug 🐛 Something doesn't work docs Improvements or additions to the documentation labels Sep 2, 2019
@eps1lon
Copy link
Member

eps1lon commented Sep 2, 2019

Thank you for raising this issue. I can confirm the bug.

I'd also like to note that react-select is still using cWRP. While the warning will be fixed once JedWatson/react-select#3716 is released it's still using those unsafe lifecycle methods. Just writing this down as a mental note that this demo will cause issues in concurrent mode.

@ghost
Copy link

ghost commented Sep 5, 2019

If you comment out those PropTypes in SingleValue. and Option.propTypes errors disappear and everything seems to be working as expected. Is there any actual need for those?

@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 5, 2019

See #13863, we will remove these 3 integration examples in favor of a single, ready to use one.

@oliviertassinari oliviertassinari self-assigned this Sep 24, 2019
@oliviertassinari oliviertassinari added the component: autocomplete This is the name of the generic UI component, not the React module! label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants