valor-software / ng2-select

Angular based replacement for select boxes
http://valor-software.github.io/ng2-select/
MIT License
675 stars 587 forks source link

Reactive form Disabled is not working #901

Open bhushangahire opened 6 years ago

bhushangahire commented 6 years ago

ng2-select version: Angular Version: 4.4.6 CLI : 1.5.2

Example: form = new FormGroup({ first: new FormControl({value: 'Nancy', disabled: true}, Validators.required), last: new FormControl('Drew', Validators.required) });

It does not disable the drop-down. Above is just example, I have a working drop-down with the values.

tltthuan commented 6 years ago

Same thing happened to me. I know we do have an attribute disabled but I hate to see the warning when we combine it with form-control

dave0688 commented 6 years ago

I have exactly the same problem. I solved it now with the disabled attribute, but it always throws those ugly warnings. Is there any timeline when this is gonna be solved?

optimistex commented 6 years ago

Hi. It was fixed in that fork: https://github.com/optimistex/ng2-select-ex Currently, it is working with FormControl.disable/enable as expected. Try it.