You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am binding table using ngrx-forms formStateArray. I want to mark controls as dirty when the original value is not equal to user entered value. I tried with following
onNgrxFormsAction(MarkAsDirtyAction, (state, action) => {
let newFormArrayState = state.formState;
if (originalValue === newValue) {
const pristineAction = new MarkAsPristineAction(action.controlId);
newFormArrayState = formArrayReducer(state.formState, pristineAction);
}
I am binding table using ngrx-forms formStateArray. I want to mark controls as dirty when the original value is not equal to user entered value. I tried with following
onNgrxFormsAction(MarkAsDirtyAction, (state, action) => {
let newFormArrayState = state.formState;
if (originalValue === newValue) {
const pristineAction = new MarkAsPristineAction(action.controlId);
newFormArrayState = formArrayReducer(state.formState, pristineAction);
}
}),
The code above is updating the control as pristine. How to update parent form state based on all of its child?
Or is there any way to achieve this?
The text was updated successfully, but these errors were encountered: