You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you click stuff inside the portal, changing state on a parent element causes a render on the click target. When this event bubbles to the Portal, the contains check inside the portals closeOnOutsideClick cannot reference the e.target
I worked around this by wrapping the state changing method in requestAnimationFrame, so the closeOnOutsideClick resolver runs first, and then the state change.
I have found that when using the PortalWithState with closeOnOutsideClick my modal will close when using state to conditionally render components.
Changing state to edit: true. Causes modal to close.
Has anyone else experienced, have a fix? Going to see if I can figure out a fix locally and PR if so.
The text was updated successfully, but these errors were encountered: