Skip to content

Commit

Permalink
add empty search results state
Browse files Browse the repository at this point in the history
  • Loading branch information
duranb committed Dec 5, 2024
1 parent 7c9fd18 commit c539c8c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/components/sequencing/CommandPanel/CommandDictionary.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,17 @@
</select>
</div>
<div class="dictionary-results">
{#each commandResults as commandResult}
<div class="dictionary-result">
<button class="st-button-link" on:click={() => onSelectCommandDefinition(commandResult)}>
{commandResult.stem}
</button>
</div>
{/each}
{#if commandResults.length > 0}
{#each commandResults as commandResult}
<div class="dictionary-result">
<button class="st-button-link" on:click={() => onSelectCommandDefinition(commandResult)}>
{commandResult.stem}
</button>
</div>
{/each}
{:else}
No {searchFieldMap[searchField]} matched your search query.
{/if}
</div>
</div>
<div class="command-metadata-container" class:hidden={selectedCommandDefinition === null}>
Expand Down

0 comments on commit c539c8c

Please sign in to comment.