Fix unselecting a command
This commit is contained in:
parent
0fcab30629
commit
1cebe3ca8b
|
@ -14,7 +14,7 @@
|
||||||
@keyup="search"
|
@keyup="search"
|
||||||
ref="searchInput"
|
ref="searchInput"
|
||||||
@keydown.down.prevent="() => select(0, 0)"
|
@keydown.down.prevent="() => select(0, 0)"
|
||||||
@keyup.prevent.delete="() => selectedCmd = null"
|
@keyup.prevent.delete="unselectCmd"
|
||||||
@keyup.prevent.enter="doCmd"
|
@keyup.prevent.enter="doCmd"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -136,7 +136,10 @@ export default {
|
||||||
return this.search === '' || Object.keys(this.results).length === 0
|
return this.search === '' || Object.keys(this.results).length === 0
|
||||||
},
|
},
|
||||||
loading() {
|
loading() {
|
||||||
return this.taskService.loading
|
return this.taskService.loading ||
|
||||||
|
this.listService.loading ||
|
||||||
|
this.namespaceService.loading ||
|
||||||
|
this.teamService.loading
|
||||||
},
|
},
|
||||||
placeholder() {
|
placeholder() {
|
||||||
if (this.selectedCmd !== null) {
|
if (this.selectedCmd !== null) {
|
||||||
|
@ -284,6 +287,13 @@ export default {
|
||||||
|
|
||||||
elems.focus()
|
elems.focus()
|
||||||
},
|
},
|
||||||
|
unselectCmd() {
|
||||||
|
if (this.query !== '') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.selectedCmd = null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Reference in New Issue