Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add 'data-turbo-action' to the paginate helper? #1083

Open
viktorsmari opened this issue Apr 22, 2022 · 4 comments
Open

Is it possible to add 'data-turbo-action' to the paginate helper? #1083

viktorsmari opened this issue Apr 22, 2022 · 4 comments

Comments

@viktorsmari
Copy link

viktorsmari commented Apr 22, 2022

In the pagy gem, this is possible:

<%== pagy_nav(@pagy, link_extra: 'data-turbo-action="advance"') %>

Is there something similar like the link_extra in kaminari for the paginate helper?

Then Hotwire would work with the pagination links.

Relevant video

@acidtib
Copy link

acidtib commented Jul 3, 2023

i got around this by using a custom theme and editing the layouts to include extra information.

<%= link_to page, url, remote: remote, rel: page.rel, class: 'page-link', data: { turbo_action: "advance", action: "click->search--pagination#move" } %>

@1c7
Copy link

1c7 commented Mar 29, 2024

no solution?

@yuki24
Copy link
Member

yuki24 commented Mar 29, 2024

@1c7 There is a proposed solution on #1095.

@1c7
Copy link

1c7 commented Mar 29, 2024

@yuki24 Thanks for reply,
the PR looks great, what stoping the PR from merge into main?


update: I use gem "pagy" now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants