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

Invalid prop children supplied to ReactOverlaysDropdown, expected a ReactNode. #925

Open
soetji opened this issue Mar 4, 2021 · 2 comments

Comments

@soetji
Copy link

soetji commented Mar 4, 2021

Describe the bug

Got the above error when trying the example from https://react-bootstrap.github.io/react-overlays/api/Dropdown.

To Reproduce

See the console after loading the example below.

Reproducible Example

https://codesandbox.io/s/react-playground-forked-w5u3v?file=/DropDownBar.js:1696-1725

Expected behavior

No errors.

Screenshots

Environment (please complete the following information)

  • Operating System: macOS
  • Browser, Version Chrome 88
  • react-overlays Version 5.0.0

Additional context

@kyletsang
Copy link
Member

Looks like docs need to be updated for v5. Dropdown just takes a regular node as children now, not a function. There are also some other API changes regarding what useDropdownMenu returns.

Here's a working example for v5:
https://codesandbox.io/s/react-playground-forked-y4ep0?file=/DropDownBar.js

@soetji
Copy link
Author

soetji commented Sep 27, 2021

Can someone update the docs?

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