mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 14:58:36 +08:00
This commit is contained in:
@ -40,7 +40,7 @@ export const createOverlayComponent = <OverlayComponent extends object, OverlayT
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (this.props.isOpen as boolean) {
|
if (this.props.isOpen) {
|
||||||
this.present();
|
this.present();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ export const createOverlayComponent = <OverlayComponent extends object, OverlayT
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return ReactDOM.createPortal(
|
return ReactDOM.createPortal(
|
||||||
this.props.children,
|
this.props.isOpen ? this.props.children : null,
|
||||||
this.el
|
this.el
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user