Ver código fonte

使用表格过滤器滑动面板布局时,搜索后只在第一页默认展开滑动面板

jqh 5 anos atrás
pai
commit
dd44e878e8
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5 1
      src/Grid/Tools/FilterButton.php

+ 5 - 1
src/Grid/Tools/FilterButton.php

@@ -49,7 +49,11 @@ class FilterButton extends AbstractTool
         $id = $filter->filterID();
 
         if ($filter->mode() === Filter::MODE_RIGHT_SIDE) {
-            $expand = $filter->expand ? 'true' : 'false';
+            if ($this->filter()->grid()->model()->getCurrentPage() > 1) {
+                $expand = 'false';
+            } else {
+                $expand = $filter->expand ? 'true' : 'false';
+            }
 
             $script = <<<JS
 (function () {