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

Method renderInput

core/src/components/alert/alert.tsx:662–717  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

660 }
661
662 private renderInput() {
663 const inputs = this.processedInputs;
664 if (inputs.length === 0) {
665 return null;
666 }
667 return (
668 <div class="alert-input-group">
669 {inputs.map((i) => {
670 if (i.type === 'textarea') {
671 return (
672 <div class="alert-input-wrapper">
673 <textarea
674 placeholder={i.placeholder}
675 value={i.value}
676 id={i.id}
677 tabIndex={i.tabindex}
678 {...(i.attributes as { [key: string]: any })}
679 disabled={i.attributes?.disabled ?? i.disabled}
680 class={inputClass(i)}
681 onInput={(e) => {
682 i.value = (e.target as any).value;
683 if (i.attributes?.onInput) {
684 i.attributes.onInput(e);
685 }
686 }}
687 />
688 </div>
689 );
690 } else {
691 return (
692 <div class="alert-input-wrapper">
693 <input
694 placeholder={i.placeholder}
695 type={i.type}
696 min={i.min}
697 max={i.max}
698 value={i.value}
699 id={i.id}
700 tabIndex={i.tabindex}
701 {...(i.attributes as { [key: string]: any })}
702 disabled={i.attributes?.disabled ?? i.disabled}
703 class={inputClass(i)}
704 onInput={(e) => {
705 i.value = (e.target as any).value;
706 if (i.attributes?.onInput) {
707 i.attributes.onInput(e);
708 }
709 }}
710 />
711 </div>
712 );
713 }
714 })}
715 </div>
716 );
717 }
718
719 private onBackdropTap = () => {

Callers 1

renderAlertInputsMethod · 0.95

Calls 1

inputClassFunction · 0.85

Tested by

no test coverage detected