fix(angular, react, vue): overlays no longer throw errors when used inside tests (#24681)

resolves #24549, resolves #24590
This commit is contained in:
Liam DeBeasi
2022-02-02 15:25:51 -05:00
committed by GitHub
parent b0c9f097d2
commit 897ae4a454
12 changed files with 94 additions and 74 deletions

View File

@@ -1,4 +1,5 @@
import { PopoverOptions, popoverController } from '@ionic/core/components';
import { defineCustomElement } from '@ionic/core/components/ion-popover.js';
import { useCallback } from 'react';
import { ReactComponentOrElement } from '../models/ReactComponentOrElement';
@@ -16,6 +17,7 @@ export function useIonPopover(component: ReactComponentOrElement, componentProps
const controller = useOverlay<PopoverOptions, HTMLIonPopoverElement>(
'IonPopover',
popoverController,
defineCustomElement,
component,
componentProps
);