How to prevent reloading page when using pagy_items_selector_js
with TurboRails
#681
Closed
nnhutan
started this conversation in
Feature Requests
Replies: 2 comments 1 reply
-
@nnhutan yes, it looks like turbo intercepts only regular I will add an extra keyword argument to the ruby helper that will allow you to customize the helper behavior (per helper) with whatever javascript statement you prefer to handle the pagy_items_selector_js(@pagy, goto_url_js: 'Turbo.visit(url);') It will work the same also for Let me see if I can release it in a couple of days 😎 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Implemented in 8.0.2. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently using TurboRails for my Rails app. I use
pagy_items_selector_js
helper. I found that when we submit the number of items in the input the script will updatewindow.location.href
so it causes the reloading page. In this case, if I useTurbo.visit
or thea
tag to navigate, the page does not reload.related codes:
Beta Was this translation helpful? Give feedback.
All reactions