Ant Modal component behavior inconsistent.

In trying to assist a fellow community member with some questions, I came across an odd behavior with the Ant Modal component. I had configured a modal containing a component with a Side Effect with actions on (component) load/unload. The odd behavior was that the actions did not trigger consistently or as I was expecting (when the modal was opening or closing).

After inspecting the modal state values, I noticed the modal open value wasn’t being set - it was either Nothing or false, and only when the modal was closed was its open value actually being set (to false).

To investigate, I added a dialog component to see if it behaves similarly and it didn’t. The dialog component was working as expected.

I setup a test project to demonstrate this: https://antmodaltest.plasmic.run/

Maybe the Plasmic team can help shed some light on this. The project ID is paEWmMz5XwbywoPCHm9A25.

you’re right, that’s a bug!

Thank you for the detailed bug report. We have pushed the fix for it. The modal state should now be in sync. As for the side-effect load/unload, they will still only trigger once due to how antd modals work.

Great news, thanks for the fix and for the follow up!