From 1cebe3ca8b2b6592160a7227bb995c1435a404fa Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 30 May 2021 17:02:36 +0200 Subject: [PATCH] Fix unselecting a command --- src/components/quick-actions/quick-actions.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/quick-actions/quick-actions.vue b/src/components/quick-actions/quick-actions.vue index 2594e9e2f..c7573a9cd 100644 --- a/src/components/quick-actions/quick-actions.vue +++ b/src/components/quick-actions/quick-actions.vue @@ -14,7 +14,7 @@ @keyup="search" ref="searchInput" @keydown.down.prevent="() => select(0, 0)" - @keyup.prevent.delete="() => selectedCmd = null" + @keyup.prevent.delete="unselectCmd" @keyup.prevent.enter="doCmd" /> @@ -136,7 +136,10 @@ export default { return this.search === '' || Object.keys(this.results).length === 0 }, loading() { - return this.taskService.loading + return this.taskService.loading || + this.listService.loading || + this.namespaceService.loading || + this.teamService.loading }, placeholder() { if (this.selectedCmd !== null) { @@ -284,6 +287,13 @@ export default { elems.focus() }, + unselectCmd() { + if (this.query !== '') { + return + } + + this.selectedCmd = null + }, }, }