After updating to RC6 I have problem with select that are disabled depending on a variable like this : https://plnkr.co/edit/h1KktXxEfhypHEgefDWQ?p=preview
I already take a look at this warning message with disabled option set to true at the creation of the control but it doesn't fit my need as this can't be dynamic (I have to call .disable() / .enable())
Here is some code in case plnkr does not work :
@Component({
selector: 'my-app',
template: `
<form [formGroup]="form">
//this select is disabled
<select formControlName="control1" disabled>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
</select>
//This select isn't disabled after RC6 update
<select formControlName="control2" [disabled]="true">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
</select>
</form>
`,
})
export class App {
form:FormGroup;
constructor() {
this.form = new FormGroup({
control1: new FormControl('2');
control2: new FormControl('2');
});
}
}
Note : This may be a duplicate of angular2 will not disable input based on true or false condition but this question was not clear to me and I am not able to comment yet