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

Method openModal

core/src/components/select/select.tsx:789–822  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

787 }
788
789 private openModal() {
790 const { multiple, value, interfaceOptions } = this;
791 const mode = getIonMode(this);
792
793 const modalOpts: ModalOptions = {
794 ...interfaceOptions,
795 mode,
796
797 cssClass: ['select-modal', interfaceOptions.cssClass],
798 component: 'ion-select-modal',
799 componentProps: {
800 header: interfaceOptions.header,
801 cancelText: this.cancelText,
802 multiple,
803 value,
804 options: this.createOverlaySelectOptions(this.childOpts, value),
805 },
806 };
807
808 /**
809 * Workaround for Stencil to autodefine
810 * ion-select-modal and ion-modal when
811 * using Custom Elements build.
812 */
813 // eslint-disable-next-line
814 if (false) {
815 // eslint-disable-next-line
816 // @ts-ignore
817 document.createElement('ion-select-modal');
818 document.createElement('ion-modal');
819 }
820
821 return modalController.create(modalOpts);
822 }
823
824 /**
825 * Close the select interface.

Callers 1

createOverlayMethod · 0.95

Calls 3

getIonModeFunction · 0.90
createMethod · 0.65

Tested by

no test coverage detected