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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
packages/core/src/style_manager/model/Property.ts
|
|
|
@ -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>; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -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; |
|
|
|
|