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
Use case:
In our situation we have a subform where we can select a template. If a template is chosen, other subforms are updated with values from the template and the controls are disabled.
We are using valueChanges on the root form to conditionally setting the template values on the disabled controls (amongst quite some other things). When changing the template value, we are setting values on already disabled controls, which is done in ngx-sub-form.component.ts in the writeValue function there is some workaround implemented because of some reported bugs in angular forms regarding setting values on a disabled form.
Although the workaround 'fixes' this issue, it also triggers a valueChanges on the form again because of setting the formGroup to disabled again. I would expect that {emitEvent: false} should be used when disabling the formGroup again (just like is done when setting the value).
Use case:
In our situation we have a subform where we can select a template. If a template is chosen, other subforms are updated with values from the template and the controls are disabled.
We are using valueChanges on the root form to conditionally setting the template values on the disabled controls (amongst quite some other things). When changing the template value, we are setting values on already disabled controls, which is done in
ngx-sub-form.component.ts
in the writeValue function there is some workaround implemented because of some reported bugs in angular forms regarding setting values on a disabled form.Although the workaround 'fixes' this issue, it also triggers a valueChanges on the form again because of setting the formGroup to disabled again. I would expect that
{emitEvent: false}
should be used when disabling the formGroup again (just like is done when setting the value).The text was updated successfully, but these errors were encountered: