@if (hasGroupedOptions() && groupedOptions(); as groups) {
@for (group of groups; track group.groupId; let isLast = $last) {
@if (group.groupLabel) {
{{ group.groupLabel }}
}
@for (option of group.options; track option.value; let optIdx = $index) {
@if (option.svgIcon) {
}
{{ option.label }}
@if (option.description) {
{{ option.description }}
}
}
}
} @else {
@for (option of filteredOptions(); track option.value; let i = $index) {
@if (!option.hidden) {
@if (option.svgIcon) {
}
{{ option.label }}
@if (option.description) {
{{ option.description }}
}
}
}
}
@if (filteredLength === 0) {
}
@if (asyncSearchEnabled() && filteredLength !== 0 && asyncSearchOptionsHaveMore()) {
}
@if (loadError() && filteredLength === 0) {
{{ loadErrorMessage() }}
}
}
@if (filteredLength === 0 && !loadError()) {