Skip to content

Commit

Permalink
11640 - fix per_page issue when the page is changed
Browse files Browse the repository at this point in the history
- Fix the scenario when per_page is selected as 100 and next page is clicked, then per_page is empty in the request.
- Expected behavior should be that it retains the per_page selected previously
  • Loading branch information
chahmedejaz committed Jul 17, 2024
1 parent 1850f29 commit 1af811c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/admin/products_v3/_filters.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= form_with url: admin_products_path, id: "filters", method: :get, data: { "search-target": "form", 'turbo-frame': "_self", 'turbo-action': "advance" } do
= hidden_field_tag :page, nil, class: "page"
= hidden_field_tag :per_page, nil, class: "per-page"
= hidden_field_tag :per_page, params[:per_page], class: "per-page"
= hidden_field_tag '[q][s]', params.dig(:q, :s) || 'name asc', class: 'sort', 'data-default': 'name asc'

.query
Expand Down

0 comments on commit 1af811c

Please sign in to comment.