Ability to configure format of pagy_url_for #756
Closed
joelzwarrington
started this conversation in
Feature Requests
Replies: 2 comments 2 replies
-
Could you give me some example of the final url strings that you want to get? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Avoid XY problem(s)
Potential Ideas:Check out this approach which uses turbo_streams, except in the context of infinite scroll: GET Requestsor you could adopt the following: <%== pagy_nav(@pagy, anchor_string: 'data-turbo-stream="true"') %> and that should preserve the params in the browser and also pass it to the rails controller in subsequent requests. (You might need a later version of hotwire/turbo - because there was a PR which allowed for streaming via get requests.) POST requests
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
pagy/gem/lib/pagy/url_helpers.rb
Line 9 in d70e443
I am trying to use Pagy with Turbo Streams and am not able to use pagy_url_for because it doesn't allow the format to be set to :turbo_stream. Thus sending + receiving HTML which doesn't update the page.
As a work-around I am simply doing the following:
however, I do need to add all of the params to this url helper if I'd like it passed through (such as when implementing filters)
Beta Was this translation helpful? Give feedback.
All reactions