浏览代码

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

jqh 4 年之前
父节点
当前提交
7ed2a887e8
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/Grid/Filter/Scope.php

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

@@ -75,9 +75,10 @@ class Scope implements Renderable
      */
     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>";
     }