angular11 - NG-ZORRO 中的表格过滤器
问题描述
我在我的 Angular 11 应用程序中使用 NG-ZORRO 的 nz-table 组件。当用户在文本框中输入时,我想要即时搜索功能。 这是我使用 nz-table 的 UI
根据他们的文档,我知道 NG-ZORRO 中有列级过滤器选项。
但是没有找到我想要的这样的功能。任何想法是否有办法做到这一点。
解决方案
您可以在 th 标签上添加过滤器属性 (nzFilterChange)。例如 :
filterChange(search: string) {
// You can do the job here
}
<th (nzFilterChange)="filterChange($event)">Header</th>
推荐阅读
- laravel - 如何声明对所有刀片文件可用的全局变量?
- c - else if (state == OUT) 在 C 字数统计中的作用
- docker - Github Actions + docker-compose 给出“没有这样的文件或目录”
- android - Android -- 使用 Github Actions 和 Gradle 更改 local.properties -- 可空值问题
- reactjs - 如何测试从 React 组件中的另一个函数获取数据的异步函数?
- flutter - 如何在没有 BuildContext 的情况下显示对话框?
- python - 尝试打印自定义用户状态 discord.py
- django - 如果将 django 用作没有前端的 REST API,如何使用 csrf
- spss - 将变量中的某些值从几分钟转换为几小时,同时保持其余值不变
- botium-box - 使用 Botim 和 WebdriverIO 实现聊天机器人自动化