Skip to content

Commit

Permalink
SearchControls: Don't use UrlParams instance for setEditorUrl()
Browse files Browse the repository at this point in the history
- Otherwise for example calling `$searchbar->getEditorUrl()->setParam('foo')` to manupulate params in *Any*Controller
  will affect the params of $redurectUrl
  • Loading branch information
sukhwinder33445 committed Nov 21, 2024
1 parent a116f18 commit 22bfe13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compat/SearchControls.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function createSearchBar(Query $query, ...$params): SearchBar
if (method_exists($this, 'searchEditorAction')) {
$searchBar->setEditorUrl(Url::fromPath(
"$moduleName/$controllerName/search-editor"
)->setParams($redirectUrl->getParams()));
)->setParams($redirectUrl->getParams()->toArray(false)));
}

$filterColumns = $this->fetchFilterColumns($query);
Expand Down

0 comments on commit 22bfe13

Please sign in to comment.