Skip to content

Commit

Permalink
Merge pull request #75 from fredden/url-param-grid-filter-sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinai authored Aug 30, 2023
2 parents ded7f80 + c2ac152 commit dfece09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions view/adminhtml/templates/grid.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,11 @@ $rows = $grid->getRows();
},

getFormUriEncoded(form) {
const url = form.action;
const encodedFields = Array.from(form.elements)
.map(input => encodeURIComponent(input.name) + '=' + encodeURIComponent(input.value))
.join('&');
return url + (url.includes('?') ? '&' : '?') + encodedFields;
const url = new URL(form.action);
Array.from(form.elements).forEach(
input => url.searchParams.set(input.name, input.value)
);
return url.toString();
},

updateGrid(url) {
Expand Down

0 comments on commit dfece09

Please sign in to comment.