From f8b5b6a9f11e9bcd5bc9bb48aaf1d290cd83ee1e Mon Sep 17 00:00:00 2001 From: mohamedsalem401 Date: Wed, 22 Jan 2025 15:03:07 +0200 Subject: [PATCH] Fix important value not clearing after changing the selected component --- packages/core/src/style_manager/model/Property.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/style_manager/model/Property.ts b/packages/core/src/style_manager/model/Property.ts index 4eed38023..a248b01b6 100644 --- a/packages/core/src/style_manager/model/Property.ts +++ b/packages/core/src/style_manager/model/Property.ts @@ -354,7 +354,7 @@ export default class Property = PropertyProps> ext } __getClearProps() { - return { value: '' } as unknown as Partial; + return { value: '', important: false } as unknown as Partial; } /** @@ -492,7 +492,7 @@ export default class Property = PropertyProps> ext const fn = this.get('functionName'); const def = this.getDefaultValue(); let value = isUndefined(val) ? (this.get('value') as string) : val; - const hasValue = !isUndefined(value) && value !== ''; + const hasValue = this.hasValue(); if (value && def && value === def) { return def;