Close popover if it is open without reopen. Controlled version. #2393
Unanswered
ensidialabs
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a stub. I want to make it so that when I click on the button, the popover opens and when I click on it again, it closes (if open) and at the same time when I click on the free area, it also closes.
Now when I click on the button, the window closes and opens again. I can’t find a solution, please point me in the right direction on how to do this (I understand that you can probably make 1 more state and check through it, but somehow it doesn’t look elegant).
https://codesandbox.io/p/sandbox/dazzling-tess-5xmx3m
Beta Was this translation helpful? Give feedback.
All reactions