Replies: 2 comments
-
I've figured out a workaround, but I still welcome better solutions. So what I've figured out is that when you have the Modal front end code in the hook, during the close transition the function is either refreshed or something. But if you extract that code just outside it works. So now I've got a
|
Beta Was this translation helpful? Give feedback.
-
Please could you attach some sort of code snippet? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So I've created a useModal hook component.
Inside it contains a state, open and close function, and a Modal component that takes a children property.
When I open the modal via the open function it works, transitions, and shows the dialog.
But on the close function, either by clicking next to the modal or clicking the close button, the closing transition does not fire.
The modal just instantly disappears. I've tried adding the afterLeave property to the Transition but that also didn't work.
Has anyone experienced this?
Beta Was this translation helpful? Give feedback.
All reactions