angular - kendoGridHeaderTemplate 上的 Kendo-Grid 排序
问题描述
看来,当进度将 kendo-grid 更新到 3.6.1 时,更改日志显示“在单击标题 tem 中的不可聚焦元素时不会发出 sortChange”。
以前,在 3.6.0 及以下版本中,我们使用 kendoGridHeaderTemplate 实现了一些自定义过滤和显示,如下所示:
<ng-template kendoGridHeaderTemplate let-dataItem let-columnIndex="columnIndex">
<span id="{{col.DisplayName}}-header"></span>
{{col.DisplayName}}
<span id="filter-popover-button-{{col.DisplayName}}" #filterPopoverButton (click)="col['showColumnFilter']= !col['showColumnFilter']">
<i [class]="col['hasFilter']? 'ld-icon filter-blue-active':'ld-icon filter-green'"
aria-hidden="true" style="vertical-align:text-bottom;"></i>
</span>
<kendo-popup *ngIf="col['showColumnFilter']" [anchor]="filterPopoverButton">
<span class="pull-right">
<button type="button" class="close" aria-label="Close" style="padding: 0px;margin-right: 25px;margin-top: 5px;"
(click)="col['showColumnFilter'] = false">
<span aria-hidden="true" style="text-shadow: none;">×</span>
</button>
</span>
<columnFilter-component [column]="col"></columnFilter-component>
</kendo-popup>
</ng-template>
在此代码中,有一个过滤器图标,可打开带有自定义过滤器/显示的 kendo-popover。现在,当我们升级到 3.7.1 时,单击此图标会导致网格排序/刷新。
我相信这是对上面提到的 3.6.1 的更新。
是否可以在 kendoGridHeaderTemplate 中有一个不触发排序事件的项目?
我们确实希望网格可排序,但不是当他们单击打开过滤器弹出窗口时。
解决方案
推荐阅读
- angular - 在执行流的其余部分之前,如何强制流等待 interval() 运算符完成?
- jquery - 当我在手机浏览器中查看我的页面时,JavaScript 不起作用
- r - 如何处理具有许多 0 的时间序列数据?
- javascript - 当我单击选择时,useEffect() 使我的应用程序挂起
- azure - ARM模板:从不同的文件中获取参数
- scala - Scala 字符串到日期的转换
- file-upload - Hapi Js文件上传苦苦挣扎
- python - 坚持分离python中的几个循环
- wpf - MenuItem 中的 MenuItem 未使用所有可用空间
- python - 无法让 Python 选择正确的代码路径