react-overlays icon indicating copy to clipboard operation
react-overlays copied to clipboard

Invalid prop `children` supplied to `ReactOverlaysDropdown`, expected a ReactNode.

Open soetji opened this issue 4 years ago • 2 comments

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

soetji avatar Mar 04 '21 17:03 soetji

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

kyletsang avatar Mar 04 '21 19:03 kyletsang

Can someone update the docs?

soetji avatar Sep 27 '21 15:09 soetji