Browse Source
Merge pull request #3441 from vvlladd28/improvement/entity-component
Removed reset form from update entity
pull/3470/head
Igor Kulikov
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
2 deletions
-
ui-ngx/src/app/modules/home/components/entity/entity.component.ts
|
|
|
@ -65,7 +65,6 @@ export abstract class EntityComponent<T extends BaseData<HasId>, |
|
|
|
set entity(entity: T) { |
|
|
|
this.entityValue = entity; |
|
|
|
if (this.entityForm) { |
|
|
|
this.entityForm.reset(undefined, {emitEvent: false}); |
|
|
|
this.entityForm.markAsPristine(); |
|
|
|
this.updateForm(entity); |
|
|
|
} |
|
|
|
@ -124,7 +123,7 @@ export abstract class EntityComponent<T extends BaseData<HasId>, |
|
|
|
if (isString(obj[curr])) { |
|
|
|
acc[curr] = obj[curr].trim(); |
|
|
|
} else if (isObject(obj[curr])) { |
|
|
|
acc[curr] = this.deepTrim(obj[curr]) |
|
|
|
acc[curr] = this.deepTrim(obj[curr]); |
|
|
|
} else { |
|
|
|
acc[curr] = obj[curr]; |
|
|
|
} |
|
|
|
|