mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
fix(react): overlays now correctly unmount any child components after dismissing (#23149)
resolves #23140
This commit is contained in:
@ -94,6 +94,13 @@ export const createOverlayComponent = <
|
|||||||
if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
|
if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
|
||||||
await this.overlay.dismiss();
|
await this.overlay.dismiss();
|
||||||
isDismissing = false;
|
isDismissing = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Now that the overlay is dismissed
|
||||||
|
* we need to render again so that any
|
||||||
|
* inner components will be unmounted
|
||||||
|
*/
|
||||||
|
this.forceUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user