shouldUpdateState hook
n some cases you might need to postpone state update to some time for example until field is valid. In this case you can do use shouldUpdateState
method
const form = this.store.select(['my-form-state-path']).form
.bind(myForm)
.shouldUpdateState(this.shouldUpdateState);
shouldUpdateState = (params: ShoulUpdateStateParams) => {
return true;
}
ShouldUpdateStateParams:
form:
FormGroupLike
form that has being syncedstate:
any
- state before updatevalue:
any
- current value
Last updated
Was this helpful?