From 01ab5c1d3503c7bbeee5f169f726f686edb8da40 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Thu, 24 Oct 2024 12:38:30 +0200 Subject: [PATCH] Items list: Add note that states are not updated in real-time & Code improvement Signed-off-by: Florian Hotze --- .../src/pages/settings/items/items-list-vlist.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/pages/settings/items/items-list-vlist.vue b/bundles/org.openhab.ui/web/src/pages/settings/items/items-list-vlist.vue index a1478b49ec..5686470075 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/items/items-list-vlist.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/items/items-list-vlist.vue @@ -34,7 +34,15 @@ - + + +
+ + Note: Item states are not updated in real-time. Click the refresh button to update. + +
+
+  Loading... @@ -135,6 +143,7 @@ export default { data () { return { ready: false, + loading: false, items: [], // [{ label: 'Staircase', name: 'Staircase'}], vlData: { items: [] @@ -159,6 +168,9 @@ export default { this.$f7.data.lastItemSearchQuery = this.$refs.searchbar?.f7Searchbar.query }, load () { + if (this.loading) return + this.loading = true + if (this.ready) this.$f7.data.lastItemSearchQuery = this.$refs.searchbar?.f7Searchbar.query this.ready = false @@ -178,6 +190,7 @@ export default { this.$refs.searchbar?.f7Searchbar.search(this.$f7.data.lastItemSearchQuery || '') }) + this.loading = false this.ready = true }) },