When using mat-table, grouping works fine without filtering. However, once the table is filtered or if the search bar is focused, ungrouping causes the rows in the table to disappear. I am looking for a solution that allows me to group and ungroup the table even after it has been filtered. This issue also occurs when focusing on the filter search bar before grouping. I suspect the problem lies with the filter predicate that is set up for the search bar.
You can view the working example on StackBlitz here:
https://stackblitz.com/edit/xwcnz?file=src%2Fapp%2Fapp.component.ts