@if (selectedOptions().length > 0) { @if (multiple()) { @for (item of selectedOptions(); track $index) { {{ item.label }} } } @else { @let option = selectedOptions()[0];
{{ option.label }}
} }
@let placeholderText = !multiple() && selectedOptions().length > 0 ? selectedOptions()[0].label : placeholder(); @if (!inline()) {
@if (filteredOptions()?.isLoading()) { } @else { }
}
@if (filter(); as filterValue) { Results for "{{ filterValue }}" } @else { Select an option }
    @if (filteredOptions()?.isLoading() && !filteredOptions()?.error()) {
  • Loading...
  • } @else if (filteredOptions()?.error()) {
  • Error loading data
  • } @else { @for (option of filteredOptions()?.value(); track $index) { @let isActive = selectedValues().length === 0 && $index === 0; @let isSelected = selectedValues().includes(option.value);
  • {{ option.label }} {{ option.description }}
  • } @empty {
  • No data found
  • } }