Fix disabled attribute with reactive form warning
The following warning appears in several places throughout the app, causing performance issues:
It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true
when you set up this control in your component class, the disabled attribute will actually be set in the DOM for
you. We recommend using this approach to avoid 'changed after checked' errors.
Example:
// Specify the `disabled` property at control creation time:
form = new FormGroup({
first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),
last: new FormControl('Drew', Validators.required)
});
// Controls can also be enabled/disabled after creation:
form.get('first')?.enable();
form.get('last')?.disable();
Occurrences
- PAT/REPOSE: Selecting a symptom check for answering spawns the warning for each question
- HCP: Accessing /monitoring-setup as well as adding any question
- All: Accessing /settings/transmission spawns it for each settings entry
- etc.