Skip to content

Commit

Permalink
Better way to display the search while there is no options
Browse files Browse the repository at this point in the history
  • Loading branch information
mcastagnetti committed Sep 12, 2023
1 parent d4a8037 commit bf4f452
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/runtime/components/forms/SelectMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@
</div>
</li>
</component>
<p v-else-if="searchable && !filteredOptions.length && isSearching" :class="uiMenu.option.empty">
<slot name="option-empty-loading" :query="query">
{{ query ? `Searching for "${query}"` : "Searching for results..." }}
</slot>
</p>
<p v-else-if="searchable && query && !filteredOptions.length" :class="uiMenu.option.empty">
<slot name="option-empty" :query="query">
No results for "{{ query }}".
</slot>
</p>
<p v-else-if="searchable && !filteredOptions.length && isSearching" :class="uiMenu.option.empty">
<slot name="option-empty-loading" :query="query">
Searching for results...
</slot>
</p>
</component>
</Transition>
</div>
Expand Down

0 comments on commit bf4f452

Please sign in to comment.