Browse Source

Fix important value not clearing after changing the selected component (#6381)

Co-authored-by: Artur Arseniev <artur.catch@hotmail.it>
pull/6398/head
mohamed yahia 1 year ago
committed by GitHub
parent
commit
fa087df758
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      packages/core/src/style_manager/model/Property.ts

4
packages/core/src/style_manager/model/Property.ts

@ -354,7 +354,7 @@ export default class Property<T extends Record<string, any> = PropertyProps> ext
} }
__getClearProps() { __getClearProps() {
return { value: '' } as unknown as Partial<T>; return { value: '', important: false } as unknown as Partial<T>;
} }
/** /**
@ -492,7 +492,7 @@ export default class Property<T extends Record<string, any> = PropertyProps> ext
const fn = this.get('functionName'); const fn = this.get('functionName');
const def = this.getDefaultValue(); const def = this.getDefaultValue();
let value = isUndefined(val) ? (this.get('value') as string) : val; let value = isUndefined(val) ? (this.get('value') as string) : val;
const hasValue = !isUndefined(value) && value !== ''; const hasValue = this.hasValue();
if (value && def && value === def) { if (value && def && value === def) {
return def; return def;

Loading…
Cancel
Save