Issue
I want to disable mat-form-field and/or mat-autocomplete if source list is empty. I've tried disable="true" (disable=list.empty) on mat-form-field and doesnt work.
Here's stackblitz: https://stackblitz.com/angular/dnbdkokmnelo?file=app%2Fchips-autocomplete-example.html
What if the fruits list was empty?
I'm looking for something like disabled mat-select...
https://stackblitz.com/angular/rkdgkaerxdk?file=app%2Fselect-disabled-example.ts
Solution
If you want to disable MatChipList just write [disabled]="true" in mat-chip-list tag. Now the user can not remove chips anymore.
If you want to disable the input field, just write [disabled]="true" in the input tag.
Of course you can use any condition instead of true
Answered By - miladfm
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.