MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / createOverlay

Method createOverlay

core/src/components/select/select.tsx:495–521  ·  view source on GitHub ↗
(ev?: UIEvent)

Source from the content-addressed store, hash-verified

493 }
494
495 private createOverlay(ev?: UIEvent): Promise<OverlaySelect> {
496 let selectInterface = this.interface;
497 if (selectInterface === 'action-sheet' && this.multiple) {
498 printIonWarning(
499 `[ion-select] - Interface cannot be "${selectInterface}" with a multi-value select. Using the "alert" interface instead.`
500 );
501 selectInterface = 'alert';
502 }
503
504 if (selectInterface === 'popover' && !ev) {
505 printIonWarning(
506 `[ion-select] - Interface cannot be a "${selectInterface}" without passing an event. Using the "alert" interface instead.`
507 );
508 selectInterface = 'alert';
509 }
510
511 if (selectInterface === 'action-sheet') {
512 return this.openActionSheet();
513 }
514 if (selectInterface === 'popover') {
515 return this.openPopover(ev!);
516 }
517 if (selectInterface === 'modal') {
518 return this.openModal();
519 }
520 return this.openAlert();
521 }
522
523 private updateOverlayOptions(): void {
524 const overlay = this.overlay as any;

Callers 1

openMethod · 0.95

Calls 5

openActionSheetMethod · 0.95
openPopoverMethod · 0.95
openModalMethod · 0.95
openAlertMethod · 0.95
printIonWarningFunction · 0.90

Tested by

no test coverage detected