react-overlays
react-overlays copied to clipboard
Dropdown toggle bug
Toggle handler has an error in the interface
To Reproduce it open sandbox
Steps to reproduce the behavior:
- Create dropdown with Dropdown component
- Pass an onToggle function as a props
- Click it
- See an error
Reproducible Example
Minimal example by using CodeSandbox.
Expected behavior
Flag show should be boolean
Received
false or event

Environment
- Browser, Version [e.g. Chrome 74]
- react-overlays Version [e.g. 2.0.0]
I have this issue too with react-overlays version 5.1.1.
It happens when I use the toggle from useDropdownToggle in the onClick for my button element. The show from useDropdownToggle becomes an event object when it is supposed to be true. It works when I don't have toggle on the onClick. See on the codesandbox below.
https://codesandbox.io/s/react-playground-forked-3xe86?file=/DropDownBar.js
