Open abdulhamdan8 opened 3 years ago
same error with me whenever i search particular name(value) and select then previous selected values automatically gets deselected and another is whenever i reopen filter typed value remains same..
I solved this problem by combining the code from this two posts: https://stackblogger.com/angular-material-multi-select-all-with-large-dataset/ https://stackblitz.com/edit/mat-select-filter?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts Bassically you need the code from the last post and you just add the "mat-select-filter" part. There's a function called "ngAfterViewInit", where always makes sure the selected values are correct, even if you scroll or search another word on filter. Also using CdkVirtualScrollViewport, makes your dropdown way faster. It will loke something like this:
this package doesn't filter properly with multi select dropdown