select-country
select-country copied to clipboard
disabled attribute with a reactive form directive
Bug Report or Feature Request (mark with an x)
- [X ] bug report -> please search issues before submitting
- [ ] feature request
OS and Version?
Versions
Repro steps
Following the steps at https://angular-material-extensions.github.io/select-country/ for reactive form
The log given by the failure
There is a warning message in the console but the country drop down works as expected... My code is identical to the sample provided at https://angular-material-extensions.github.io/select-country/ 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:
form = new FormGroup({
first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),
last: new FormControl('Drew', Validators.required)
});