bug: isDismissing on Overlay is scoped to exported IonModal class and not instances of the IonModal. #23904
Closed
4 of 6 tasks
Labels
Milestone
Prequisites
Ionic Framework Version
Current Behavior
Speaking on behalf of ionic/react: 5.7.0.
IonModal will mount child components even if isOpen is hardcoded to
false
due to the isDismissing flag on thecreateOverlayComponent
HOC.Expected Behavior
If IonModal
isOpen
is hardcoded to false, I would expect my child component NEVER gets mounted. Like why would it lol?Steps to Reproduce
You need to have multiple IonModals being rendered. Then as you dismiss one using simple setState boolean toggles lets say, you will notice that other IonModals will see isDismissing as true, even if isOpen is hardcoded to false. And that causes the inner children to mount.
Code Reproduction URL
No response
Ionic Info
No response
Additional Information
I think this is due to the isDismissing flag being scoped to the
createOverlayComponent
and not the instance of the Overlay class / IonModal instance. Shouldn't each IonModal be independent of the others?The text was updated successfully, but these errors were encountered: