Skip to content

Commit

Permalink
fix(react): overlays now correctly unmount any child components after…
Browse files Browse the repository at this point in the history
… dismissing (#23149)

resolves #23140
  • Loading branch information
liamdebeasi committed Apr 6, 2021
1 parent 6df1215 commit dee6eb3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/react/src/components/createOverlayComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit dee6eb3

Please sign in to comment.