mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(angular, react, vue): add support for autoMountComponent (#25552)
This commit is contained in:
@ -21,6 +21,7 @@ interface IonicReactInternalProps<ElementType> extends React.HTMLAttributes<Elem
|
||||
onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
|
||||
onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
|
||||
onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
|
||||
keepContentsMounted?: boolean;
|
||||
}
|
||||
|
||||
export const createInlineOverlayComponent = <PropType, ElementType>(
|
||||
@ -128,7 +129,7 @@ export const createInlineOverlayComponent = <PropType, ElementType>(
|
||||
* so conditionally render the component
|
||||
* based on the isOpen state.
|
||||
*/
|
||||
return createElement(tagName, newProps, (this.state.isOpen) ?
|
||||
return createElement(tagName, newProps, (this.state.isOpen || this.props.keepContentsMounted) ?
|
||||
createElement('div', {
|
||||
id: 'ion-react-wrapper',
|
||||
ref: this.wrapperRef,
|
||||
|
Reference in New Issue
Block a user