From 98271e57ca82729bc207fbaef1f80213690feb2a Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Sat, 10 Feb 2024 08:17:44 +1000 Subject: [PATCH] Item edit: Fix semantic class cleared when property set to None (#2325) On the Item Editor: Current behaviour, when we have: Semantic Class: Control Property: Light When changing Property to None, it would clear Semantic Class "Control" too. The Fix is not to clear the Semantic Class. Signed-off-by: Jimmy Tanagra --- .../web/src/components/tags/semantics-picker.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/components/tags/semantics-picker.vue b/bundles/org.openhab.ui/web/src/components/tags/semantics-picker.vue index 6d592cbd97..cb8ca8bf2b 100644 --- a/bundles/org.openhab.ui/web/src/components/tags/semantics-picker.vue +++ b/bundles/org.openhab.ui/web/src/components/tags/semantics-picker.vue @@ -64,8 +64,7 @@ export default { this.semanticClass = value } this.item.tags = this.item.tags.filter((t) => !this.semanticType(t) && !this.isSemanticPropertyTag(t)) - if (!value) return - this.item.tags.push(this.semanticClass) + if (this.semanticClass) this.item.tags.push(this.semanticClass) if (this.semanticType(this.semanticClass) === 'Point' && this.semanticProperty.length) { this.item.tags.push(this.semanticProperty) }