浏览代码

清空筛选,带清空排序

luoyifan 3 年之前
父节点
当前提交
f83c7fb309
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      src/controls/grid.js

+ 9 - 3
src/controls/grid.js

@@ -6,10 +6,13 @@ import LAY_EXCEL from "lay-excel"
 import {
     disabled,
     fieldLabel,
-    gravity, height, metaId,
+    gravity,
+    height,
+    metaId,
     PropertyDescriptionTable,
     tooltip,
-    value, width,
+    value,
+    width,
     YvBase
 } from "../PropertyDescriptionTable";
 import {PropertyDescription} from "../PropertyDescription";
@@ -590,7 +593,10 @@ export default function () {
         },
 
         clearFilter(sender) {
-            sender.up('grid').filters.clearFilters();
+            const grid = sender.up('grid')
+            grid.filters.clearFilters()
+            grid.getStore().sorters.removeAll()
+            // grid.getStore().reload()
         },
 
         saveGridUIConfig(sender) {