Skip to content

Commit 47690a6

Browse files
committed
Remove "no results" text in search dialog if input is empty
1 parent b68a817 commit 47690a6

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/lib/sidebar/SidebarSearchDialog.svelte

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@
7373
{/each}
7474
</div>
7575
<p class="text-stone-400 mt-2">
76-
{searchState === "waiting"
77-
? "Loading data..."
78-
: results.length === 0
79-
? "No results"
80-
: results.length + " result(s) found!"}
76+
{searchTerm === ""
77+
? ""
78+
: searchState === "waiting"
79+
? "Loading data..."
80+
: results.length === 0
81+
? "No results"
82+
: results.length + " result(s) found!"}
8183
</p>
8284

8385
<button class="bg-stone-700 w-full rounded-sm p-2 mt-2 text-white" onclick={() => dialog.close()}>Close</button>

0 commit comments

Comments
 (0)