Skip to content

Commit

Permalink
Fix important value not clearing after changing the selected component (
Browse files Browse the repository at this point in the history
#6381)

Co-authored-by: Artur Arseniev <artur.catch@hotmail.it>
  • Loading branch information
mohamedsalem401 and artf authored Feb 3, 2025
1 parent 4d34f52 commit fa087df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/style_manager/model/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export default class Property<T extends Record<string, any> = PropertyProps> ext
}

__getClearProps() {
return { value: '' } as unknown as Partial<T>;
return { value: '', important: false } as unknown as Partial<T>;
}

/**
Expand Down Expand Up @@ -492,7 +492,7 @@ export default class Property<T extends Record<string, any> = 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;
Expand Down

0 comments on commit fa087df

Please sign in to comment.