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
When defining FormControls as disabled: true they are omitted from form.formControlNames, which causes the following error when using the form.formControlNames.myDisabledControl key in the template:
We are currently migrating from the Inheritance based API to the new API and just ran into this issue.
I looked at the implementation of the formControlNames and noticed that they are created from the keys of the form.value from which values of disabled controls are omitted.
In the deprecated API those names where generated using the mapControl function instead.
I would expect the control name to exist even for disabled controls, as the TypeScript interface also suggests.
If this is not intended I can open a PR for this :)
The text was updated successfully, but these errors were encountered:
When defining
FormControl
s asdisabled: true
they are omitted fromform.formControlNames
, which causes the following error when using theform.formControlNames.myDisabledControl
key in the template:We are currently migrating from the Inheritance based API to the new API and just ran into this issue.
I looked at the implementation of the
formControlNames
and noticed that they are created from the keys of theform.value
from which values of disabled controls are omitted.In the deprecated API those names where generated using the
mapControl
function instead.I would expect the control name to exist even for disabled controls, as the TypeScript interface also suggests.
If this is not intended I can open a PR for this :)
The text was updated successfully, but these errors were encountered: