fix(popover): popover positions correctly on all frameworks (#26306)

Resolves #25337
This commit is contained in:
Sean Perkins
2022-11-21 22:32:46 -05:00
committed by GitHub
parent a6c9e55adc
commit be9a399eee
5 changed files with 53 additions and 42 deletions

View File

@ -55,6 +55,17 @@ export const createInlineOverlayComponent = <PropType, ElementType>(
componentDidMount() {
this.componentDidUpdate(this.props);
/**
* Mount the inner component when the
* overlay is about to open.
*
* For ion-popover, this is when `ionMount` is emitted.
* For other overlays, this is when `willPresent` is emitted.
*/
this.ref.current?.addEventListener('ionMount', () => {
this.setState({ isOpen: true });
});
/**
* Mount the inner component
* when overlay is about to open.