Merge pull request #3441 from vvlladd28/improvement/entity-component

Removed reset form from update entity
This commit is contained in:
Igor Kulikov 2020-09-14 10:53:30 +03:00 committed by GitHub
commit 1fd284f359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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];
}