Эх сурвалжийг харах

修复 Filter::scope 选择筛选项不会过滤分页参数问题

jqh 5 жил өмнө
parent
commit
7ed2a887e8

+ 4 - 3
src/Grid/Filter/Scope.php

@@ -75,9 +75,10 @@ class Scope implements Renderable
      */
      */
     public function render()
     public function render()
     {
     {
-        $url = request()->fullUrlWithQuery(
-            [$this->filter->getScopeQueryName() => $this->key]
-        );
+        $url = request()->fullUrlWithQuery([
+            $this->filter->getScopeQueryName() => $this->key,
+            $this->filter->grid()->model()->getPageName() => null,
+        ]);
 
 
         return "<li class='dropdown-item'><a href=\"{$url}\">{$this->label}</a></li>";
         return "<li class='dropdown-item'><a href=\"{$url}\">{$this->label}</a></li>";
     }
     }