当我先过滤然后将表分组时,行会消失在垫子表中 [英] rows disappear in mat table when i filter first and then group the table

查看:106
本文介绍了当我先过滤然后将表分组时,行会消失在垫子表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我不对其进行过滤时,在mat-table中进行分组会很好.
当过滤或将焦点放在搜索栏上时,该表将被过滤,但是如果我取消组合,则mat表的行将消失.
请为我提供一个解决方案,即使在过滤表后也可以对表进行分组或取消分组.
当我首先将焦点放在过滤器搜索栏上时,即使在分组时也会出现此问题.
我认为问题出在我为搜索栏设置过滤器时使用过滤器谓词.

Grouping in mat-table works fine when I don't filter it.
When filtered or put focus on search bar, the table gets filtered but then if I ungroup it, the rows of mat table disappear.
Please help me with a solution which groups or ungroups the table even after I filter it.
This problem occurs even while grouping when I put focus on filter search bar first.
I think the problem is with filter predicate when I setup filter for search bar.

这是工作堆栈闪电链接:
https://stackblitz.com/edit/xwcnz?file=src%2Fapp%2Fapp.component.ts

Here is the working stack blitz link:
https://stackblitz.com/edit/xwcnz?file=src%2Fapp%2Fapp.component.ts

推荐答案

工作我已经删除了您的过滤器分配,然后它就可以正常工作了.

I've removed your filter assignment and then it's working.

this.dataSource.filter = performance.now().toString();

我很困惑.什么是 performance ?

无论如何,我认为您的过滤和分组现在都可以正常工作了.

Anyways, I think your filtering and grouping both are working perfectly now.

这篇关于当我先过滤然后将表分组时,行会消失在垫子表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆