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

Method createAlertInputs

core/src/components/select/select.tsx:590–615  ·  view source on GitHub ↗
(
    data: HTMLIonSelectOptionElement[],
    inputType: 'checkbox' | 'radio',
    selectValue: any
  )

Source from the content-addressed store, hash-verified

588 }
589
590 private createAlertInputs(
591 data: HTMLIonSelectOptionElement[],
592 inputType: 'checkbox' | 'radio',
593 selectValue: any
594 ): AlertInput[] {
595 const alertInputs = data.map((option) => {
596 const value = getOptionValue(option);
597
598 // Remove hydrated before copying over classes
599 const copyClasses = Array.from(option.classList)
600 .filter((cls) => cls !== 'hydrated')
601 .join(' ');
602 const optClass = `${OPTION_CLASS} ${copyClasses}`;
603
604 return {
605 type: inputType,
606 cssClass: optClass,
607 label: option.textContent || '',
608 value,
609 checked: isOptionSelected(selectValue, value, this.compareWith),
610 disabled: option.disabled,
611 };
612 });
613
614 return alertInputs;
615 }
616
617 private createOverlaySelectOptions(data: HTMLIonSelectOptionElement[], selectValue: any): SelectPopoverOption[] {
618 const popoverOptions = data.map((option) => {

Callers 2

updateOverlayOptionsMethod · 0.95
openAlertMethod · 0.95

Calls 3

isOptionSelectedFunction · 0.90
getOptionValueFunction · 0.85
fromMethod · 0.80

Tested by

no test coverage detected