Aman Sharma
Aman Sharma

Reputation: 964

Disabled attribute in select not working (Angular)

Here is one question when i apply [disabled]="true" or [disabled]="false" . It won't work as of now.

I don't know what is the issue <select formControlName="actionSelected" [disabled]="condition" >

When i inspect it shows ng-reflect-is-disabled="true" in the select.

Upvotes: -1

Views: 1279

Answers (2)

Aman Sharma
Aman Sharma

Reputation: 964

It works when i set <select formControlName="actionSelected" [attr.disabled]="condition ? '' : null" >

Thanks for the help!

Upvotes: 0

Batbayr Batmunkh
Batbayr Batmunkh

Reputation: 76

Hope it help. You have to read some document

<select [attr.disabled]="CONDITION" />

Upvotes: 1

Related Questions