Skip to content

Commit 2a46194

Browse files
committed
Improves graph search UX
1 parent 21cbf8a commit 2a46194

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/webviews/apps/shared/components/search/search-box.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class GlSearchBox extends GlElement {
153153
resultsLoaded = false;
154154

155155
get hasResults() {
156-
return this.total > 1;
156+
return this.total >= 1;
157157
}
158158

159159
@query('gl-search-input')
@@ -221,6 +221,9 @@ export class GlSearchBox extends GlElement {
221221
}
222222

223223
private get resultsHtml() {
224+
if (!this.value) {
225+
return html`<span class="count"></span>`;
226+
}
224227
if (this.searching) {
225228
return html`<gl-tooltip hoist placement="top" class="count"
226229
><code-icon icon="loading" modifier="spin"></code-icon><span slot="content">Searching...</span>

0 commit comments

Comments
 (0)