Before Angular 18, we needed to manage multiple event streams for different control state changes, like statusChanges and valueChanges updates, separately. This often led to complex and error-prone code. Angular 18 introduced a new enhancement to reactive forms: unified control state change events....
Update 2: wrappingthis.formGroup.updateValueAndValidity()with asetTimeoutis a workaround. However the behavior that the two values are not in sync was totally unexpected for me, so I would still consider this as a bug. I spend like 4 hours on this 😢 Workaround (setTimeout(_=>this....
this.myForm.valueChanges.subscribe( data => { // Compare data (which is form's content) with backup and see if any fields have changed }); Unfortunately, there are two disabled fields in the form, and the values of those fields do not appear indata- if there was support inresetto ma...