We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba9638e commit cf59575Copy full SHA for cf59575
1 file changed
core/src/components/UnifiedSearch/UnifiedSearchModal.vue
@@ -304,8 +304,11 @@ export default defineComponent({
304
watch: {
305
open() {
306
// Load results when opened with already filled query
307
- if (this.open && this.searchQuery) {
308
- this.find(this.searchQuery)
+ if (this.open) {
+ this.focusInput()
309
+ if (this.searchQuery) {
310
+ this.find(this.searchQuery)
311
+ }
312
}
313
},
314
@@ -351,7 +354,11 @@ export default defineComponent({
351
354
this.$emit('update:query', this.searchQuery)
352
355
this.$emit('update:open', false)
353
356
-
357
+ focusInput() {
358
+ this.$nextTick(() => {
359
+ this.$refs.searchInput?.focus()
360
+ })
361
+ },
362
find(query: string) {
363
if (query.length === 0) {
364
this.results = []
0 commit comments