Skip to content

Commit 7123b58

Browse files
MKirovaMayaKirova
authored andcommitted
chore(*): Add back explicit markAsTouched on formControl valueChanges for the tests.
1 parent de9f80f commit 7123b58

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

projects/igniteui-angular/src/lib/grids/cell.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,10 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy, CellT
871871
*/
872872
public ngOnChanges(changes: SimpleChanges): void {
873873
if (changes.editMode && changes.editMode.currentValue && this.formControl) {
874+
// ensure when values change, form control is forced to be marked as touche.
875+
this.formControl.valueChanges.pipe(takeWhile(x => this.editMode)).subscribe(value => {
876+
this.formControl.markAsTouched();
877+
});
874878
// while in edit mode subscribe to value changes on the current form control and set to editValue
875879
this.formControl.statusChanges.pipe(takeWhile(x => this.editMode)).subscribe(status => {
876880
if (status === 'INVALID' && this.errorTooltip.length > 0) {

projects/igniteui-angular/src/lib/grids/common/crud.service.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ export class IgxCell {
101101
public _editValue: any,
102102
public rowData: any,
103103
public grid: GridType) {
104-
const formGroup = this.grid.validation.create(id.rowID, rowData);
105-
if (this.grid.validationTrigger === 'change') {
106-
formGroup.get(column.field).setValue(value);
107-
}
104+
this.grid.validation.create(id.rowID, rowData);
108105
}
109106

110107
public get editValue() {

0 commit comments

Comments
 (0)