浏览代码

Merge pull request #5935 from wenzhixin/fix/5933

Fix control remove logic
文翼 4 年之前
父节点
当前提交
1c2a475b20
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/extensions/filter-control/utils.js

+ 1 - 2
src/extensions/filter-control/utils.js

@@ -353,9 +353,8 @@ export function createControls (that, header) {
     $.each(header.find('th'), (i, th) => {
       const $th = $(th)
 
-      $th.find('.filter-control').remove()
-
       if ($th.data('field') === column.field) {
+        $th.find('.filter-control').remove()
         $th.find('.fht-cell').append(html.join(''))
         return false
       }