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

Method renderSelectIcon

core/src/components/select/select.tsx:1067–1080  ·  view source on GitHub ↗

* Renders the chevron icon * next to the select text.

()

Source from the content-addressed store, hash-verified

1065 * next to the select text.
1066 */
1067 private renderSelectIcon() {
1068 const mode = getIonMode(this);
1069 const { isExpanded, toggleIcon, expandedIcon } = this;
1070 let icon: string;
1071
1072 if (isExpanded && expandedIcon !== undefined) {
1073 icon = expandedIcon;
1074 } else {
1075 const defaultIcon = mode === 'ios' ? chevronExpand : caretDownSharp;
1076 icon = toggleIcon ?? defaultIcon;
1077 }
1078
1079 return <ion-icon class="select-icon" part="icon" aria-hidden="true" icon={icon}></ion-icon>;
1080 }
1081
1082 private get ariaLabel() {
1083 const { placeholder, inheritedAttributes } = this;

Callers 1

renderMethod · 0.95

Calls 1

getIonModeFunction · 0.90

Tested by

no test coverage detected