Browse Source

Removed reset form from update entity

pull/3441/head
Vladyslav_Prykhodko 6 years ago
parent
commit
04b4a76048
  1. 3
      ui-ngx/src/app/modules/home/components/entity/entity.component.ts

3
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) { set entity(entity: T) {
this.entityValue = entity; this.entityValue = entity;
if (this.entityForm) { if (this.entityForm) {
this.entityForm.reset(undefined, {emitEvent: false});
this.entityForm.markAsPristine(); this.entityForm.markAsPristine();
this.updateForm(entity); this.updateForm(entity);
} }
@ -124,7 +123,7 @@ export abstract class EntityComponent<T extends BaseData<HasId>,
if (isString(obj[curr])) { if (isString(obj[curr])) {
acc[curr] = obj[curr].trim(); acc[curr] = obj[curr].trim();
} else if (isObject(obj[curr])) { } else if (isObject(obj[curr])) {
acc[curr] = this.deepTrim(obj[curr]) acc[curr] = this.deepTrim(obj[curr]);
} else { } else {
acc[curr] = obj[curr]; acc[curr] = obj[curr];
} }

Loading…
Cancel
Save