mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
fix(popover): popover positions correctly on all frameworks (#26306)
Resolves #25337
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user