angular - 仅当用户按下 ok 时确认 Ng Zorro 过滤器中的选择复选框
问题描述
我有个问题。我使用 ng-zorro 通过带有复选框和 nzShowFilter 组件的下拉菜单过滤表中的数据。
我希望只有在用户按下“确定”时才会应用选择。目前,如果我选择一个复选框并关闭过滤器,则会执行过滤。我只希望在用户确认时发生这种情况,否则,必须撤消最后的更改。
<th scope="col" nz-th nzShowFilter [nzFilters]="listOfEmployee" (nzFilterChange)="filter($event,'employee')">Employee</th>
<th scope="col" nz-th nzShowFilter [nzFilters]="listOfType" (nzFilterChange)="filter($event,'type')">Type</th>
<th scope="col" nz-th nzShowFilter [nzFilters]="listOfProjects" (nzFilterChange)="filter($event,'projects')">Projects</th>
<th scope="col" nzCustomFilter>
Date
<nz-filter-trigger [(nzVisible)]="visible" [nzDropdownMenu]="menu">
<i nz-icon nzType="calendar" nzTheme="outline"></i> </nz-filter-trigger>
</th>
<th scope="col">Hours</th>
<th scope="col" nzWidth="120px">Actions</th>
</tr>
解决方案
推荐阅读
- powerbi - 计算每个子组在动态时间段内的行数
- mysql - 创建索引时在查询期间丢失与 MySQL 服务器的连接
- python - LSTM 预测连续值
- cockroachdb - 无法从 Spring Data R2DBC 驱动程序连接到 CockroachCloud 免费(测试版)集群
- javascript - 如何设置输入文本?
- powershell - 使用两个等长数组执行数学运算
- javascript - 使用extendscript制作后效组合矩阵
- javascript - shadowElement.focus() — 不可能?
- python - tkinter 主循环和线程(在装饰器中)[已解决]
- python - 这是一个字典练习。我对如何做到这一点感到困惑。有人可以帮我解决这个问题吗?