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 { ActionSheetButton, ActionSheetOptions, actionSheetController } from '@ionic/core/components';
import { defineCustomElement } from '@ionic/core/components/ion-action-sheet.js';
import { useCallback } from 'react';
import { HookOverlayOptions } from './HookOverlayOptions';
@ -11,7 +12,8 @@ import { useController } from './useController';
export function useIonActionSheet(): UseIonActionSheetResult {
const controller = useController<ActionSheetOptions, HTMLIonActionSheetElement>(
'IonActionSheet',
actionSheetController
actionSheetController,
defineCustomElement
);
const present = useCallback(