fix(react): overlays now correctly unmount any child components after dismissing (#23149)

resolves #23140
This commit is contained in:
Liam DeBeasi
2021-04-06 09:53:26 -04:00
committed by GitHub
parent 6df1215ee2
commit dee6eb30df

View File

@ -94,6 +94,13 @@ export const createOverlayComponent = <
if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
await this.overlay.dismiss();
isDismissing = false;
/**
* Now that the overlay is dismissed
* we need to render again so that any
* inner components will be unmounted
*/
this.forceUpdate();
}
}