What is the best way to run a method after a popover is closed? #1901
Unanswered
angrotheman
asked this question in
Help
Replies: 1 comment 1 reply
-
@angrotheman One way would be to use a Transition component inside the Popover. The Transition component has an AfterLeave callback prop, where you can define your method. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
When a user closes a popover, I need to run a method to clean up a few things. Closing manually is not an option because I need to run the method also when pressing escape or clicking outside the popover, etc.
What I'm missing here is an onClose prop where I could easily define my method.
Current Workaround:
Is there a better solution to this problem, or did I miss something while reading the documentation?
Thanks for any input!
Beta Was this translation helpful? Give feedback.
All reactions