소스 검색

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

jqh 4 년 전
부모
커밋
0ebf9726e6
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  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
         );