-
Notifications
You must be signed in to change notification settings - Fork 148
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
Dropdown cannot be opened again, if closed by clicking on the trigger button #34
Comments
Update@estevanmaito when debouncing the onClose handler of the Dropdown component the issue is solved. const _ = require("lodash");
...
<Dropdown
align="right"
isOpen={isProfileMenuOpen}
onClose={_.debounce(() => setIsProfileMenuOpen(false), 300)}
// onClose={() => setIsProfileMenuOpen(false)}
>
.....
</Dropdown> |
@hademo It fixes the issue, but if you put a |
Not sure why, but forcing the button to be re-mounted when changing |
Have the same issue as well. Seems like there is a race condition between the dropdown's onClose and the toggle function in the demo. |
@hademo Thanks for the debouncing fix. It did the trick for me as well. On another server, there's no need and the original code just works. Strange... |
@awesomeunleashed 's workaround worked for me, tho it still resulted in the same leak @arisferyanto refers to.. the debouncing trick did not work for me. |
same issue wasted 4h |
Relevant code or config:
What you did:
Implemented a dropdown according to the full example of the documentation https://windmillui.com/react-ui/components/dropdown
What happened:
On first render, when user clicks on toggle button, then dropdown pops up. When user clicks the toggle button again, then the dropdown is closed. After the second click the dropdown cannot be opened again and remains closed.
The text was updated successfully, but these errors were encountered: