react-overlays
react-overlays copied to clipboard
Invalid prop `children` supplied to `ReactOverlaysDropdown`, expected a ReactNode.
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
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
Can someone update the docs?