Skip to content

Commit 3a83b08

Browse files
authored
Merge pull request #56 from assureclaims/feature/RMA-91424
feature/RMA-91424
2 parents 16290a7 + 7d1231e commit 3a83b08

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

projects/dxc-ngx-cdk/src/lib/dxc-crud-table/dxc-crud-table.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,8 @@ export class DxcCrudTableComponent implements OnInit, ControlValueAccessor, OnCh
470470
this.claimsForm.markAsUntouched();
471471
if (this.sourceRequest)
472472
this.getData();
473-
else if (selectedRowIndex > -1)
473+
else
474474
this.dataSource.data = data;
475-
else this.getData();
476-
477475
selectedRowIndex = -1;
478476
// After save Event Emitter
479477
this.formControlUpdater.emit({ action: EAction.ADD, columns: this.editableFields, data: this.expandedElement });
@@ -834,6 +832,12 @@ export class DxcCrudTableComponent implements OnInit, ControlValueAccessor, OnCh
834832
case this.fieldsType.checkbox:
835833
this.claimsForm.addControl(col.name, new FormControl((col as ICheckboxProperties).checked,
836834
(col.required && col.required == true) ? Validators.required : null));
835+
const control = col as ICheckboxProperties;
836+
const formControlUpdater = this.formControlUpdater;
837+
this.claimsForm.get(col.name).valueChanges.subscribe((data) => {
838+
this.parentForm.markAsDirty();
839+
formControlUpdater.emit({ action: EAction.CHANGE, columns: this.editableFields, data: data, control: control, form: this.claimsForm });
840+
});
837841
break;
838842
case this.fieldsType.crudLookup:
839843
crudFormModel[col.name] = {};

0 commit comments

Comments
 (0)