From 785d8f6bcdcef1a3b77b9bacf7e207e32b87198c Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Thu, 24 Oct 2024 16:12:57 +0200 Subject: [PATCH] Search bars: Remember search query & Automatically focus on desktop (#2827) Signed-off-by: Florian Hotze --- .../web/src/pages/settings/model/model.vue | 17 ++++++---- .../src/pages/settings/pages/pages-list.vue | 31 ++++++++++--------- .../src/pages/settings/schedule/schedule.vue | 26 +++++++++++----- .../src/pages/settings/things/things-list.vue | 27 ++++++++++------ 4 files changed, 64 insertions(+), 37 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue b/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue index b9020a5a70..3ea0d94690 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/model/model.vue @@ -7,7 +7,7 @@ { + this.initSearchbar = true this.$nextTick(() => { - this.initSearchbar = true + if (this.$device.desktop && this.$refs.searchbar) { + this.$refs.searchbar.f7Searchbar.$inputEl[0].focus() + } + this.$refs.searchbar?.f7Searchbar.search(this.$f7.data.lastModelSearchQuery || '') this.applyExpandedOption() }) if (!this.eventSource) this.startEventSource() diff --git a/bundles/org.openhab.ui/web/src/pages/settings/pages/pages-list.vue b/bundles/org.openhab.ui/web/src/pages/settings/pages/pages-list.vue index e4ed1ff4b7..5fdb394b7b 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/pages/pages-list.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/pages/pages-list.vue @@ -1,17 +1,16 @@