Browse Source

修复表格异步渲染筛选项数量显示异常问题

jqh 4 years ago
parent
commit
0ebf9726e6
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/Grid/Concerns/HasFilter.php

+ 1 - 3
src/Grid/Concerns/HasFilter.php

@@ -150,9 +150,7 @@ trait HasFilter
             <<<JS
 var count = {$this->filter()->countConditions()};
 
-if (count > 0) {
-    $('.async-{$this->getTableId()}').find('.filter-count').text('('+count+')');
-}
+$('.async-{$this->getTableId()}').find('.filter-count').text(count > 0 ? ('('+count+')') : '');
 JS
         );