article: How to implement toggle all option in Angular Material Select | Angular Material Dev #10
Replies: 3 comments 6 replies
-
|
In current stackBlitz if I change options list in ngOnInit (like setTimeout(() => {this.toppings = [...], 2000} after Select All click I see that value of this option ('select-all') also has been added to select value. how I can prevent adding this value to select? |
Beta Was this translation helpful? Give feedback.
-
|
When unselecting all, the selectionChange event will not be triggered |
Beta Was this translation helpful? Give feedback.
-
|
You can inprove the directive if you use and in ngAfterViewInit In your subscription parentSelect.optionSelectionChanges you can add to not "lose the focus" Your forked stackblitz |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
article: How to implement toggle all option in Angular Material Select | Angular Material Dev
Learn Material Design in Angular, Theming Angular Material Components and Developing your Angular application with Material Design like a pro.
https://angular-material.dev/articles/mat-select-all
Beta Was this translation helpful? Give feedback.
All reactions