如何重置所有列过滤器?调用 reset() 似乎重置了表,但过滤器的所有字段保持不变。
最佳答案
您可以将输入值绑定(bind)到表的过滤器,如下所示:
<input type="search" (input)="table.filter($event.target.value, 'FieldName', 'contains')" [value]="table.filters['FieldName']?.value" />
注意 [value]
绑定(bind)。
关于angular - Primeng p-table : how to reset custom filters? 调用 reset() 重置表但我的过滤器的值保持不变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50970291/