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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With