diff --git a/dashboard/src/views/AppstoreView.vue b/dashboard/src/views/AppstoreView.vue index 9b54a7919..901324e87 100644 --- a/dashboard/src/views/AppstoreView.vue +++ b/dashboard/src/views/AppstoreView.vue @@ -5,7 +5,7 @@ const i18n = useI18n(); const t = i18n.t; import moment from 'moment'; -import { ref, computed, useTemplateRef, onMounted, inject, watch } from 'vue'; +import { ref, computed, useTemplateRef, onMounted, inject, watch, nextTick } from 'vue'; import { TextInput, Spinner, InputDialog, SingleSelect } from 'pankow'; import AppsModel from '../models/AppsModel.js'; import AppstoreModel from '../models/AppstoreModel.js'; @@ -161,12 +161,8 @@ onMounted(async () => { }); } } else { - setTimeout(() => { - try { - searchInput.value.$el.focus(); - // eslint-disable-next-line no-unused-vars - } catch(e) {;} - }, 100); + await nextTick(); + if (searchInput.value) searchInput.value.$el.focus(); } });