From e40c874735b14cb444302337c6b561f3b27a22c2 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Mon, 30 Sep 2024 22:22:43 +0200 Subject: [PATCH] Item metadata: Improve dirty handling & Fix state description metadata always dirty Signed-off-by: Florian Hotze --- .../item/metadata/item-metadata-widget.vue | 2 +- .../items/metadata/item-metadata-edit.vue | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/components/item/metadata/item-metadata-widget.vue b/bundles/org.openhab.ui/web/src/components/item/metadata/item-metadata-widget.vue index c591d25eb8..d516d01726 100644 --- a/bundles/org.openhab.ui/web/src/components/item/metadata/item-metadata-widget.vue +++ b/bundles/org.openhab.ui/web/src/components/item/metadata/item-metadata-widget.vue @@ -203,7 +203,7 @@ export default { }, updateComponent () { const value = this.$refs.widgets.f7SmartSelect.getValue() - this.metadata.value = value + this.metadata.value = value || ' ' // ' ' is used to indicate the default widget this.setCurrentComponent() this.setConfigDescriptions() this.setPreviewContext() diff --git a/bundles/org.openhab.ui/web/src/pages/settings/items/metadata/item-metadata-edit.vue b/bundles/org.openhab.ui/web/src/pages/settings/items/metadata/item-metadata-edit.vue index 9eeec79a13..237a8dcf17 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/items/metadata/item-metadata-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/items/metadata/item-metadata-edit.vue @@ -62,6 +62,8 @@