浏览代码

Try to fix an issue with onSort

djhvscf 7 年之前
父节点
当前提交
2a12d49574
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/extensions/filter-control/bootstrap-table-filter-control.js

+ 1 - 1
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -696,7 +696,7 @@
             if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
                 var sorter = header.find(sprintf('[data-field="%s"]', $(controls[0]).closest('table').data('sortName')));
                 if (sorter.length > 0) {
-                    that.onSort(table.data('sortName'), table.data('sortName'));
+                    that.onSort({type: 'keypress', currentTarget: sorter});
                     $(sorter).find('.sortable').trigger('click');
                 }
             }