-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
render_async issues with container_id and turbolinks : not reloading or JS not firing on new visit depending on configuration #136
Comments
Also encountering this bug @nikolalsvk |
Hey, @dbs-ced and @kofronpi. Thanks for submitting and commenting on the issue. I will look more into this and try to fix it ASAP for y'all. We recently got another issue related to Turbolinks like this one #135 What would really help is if you could provide an example where I could reproduce this. I have a Rails 6 + Turbolinks project I use to test stuff here https://github.com/nikolalsvk/rails-6-base-app/tree/render-async. If you could help me reproduce the problem there, it would be easier and faster for me to come up with a fix. Thanks a lot |
One question, @dbs-ced and @kofronpi - where did you put your I am trying to debug this issue and this info would help me a lot. EDIT: I tested this out with ReasonsThe reason why render_async doesn't trigger with Quick fixAnyway, you can easily solve this by putting Future improvement and long-term fixIn the meantime, I will try to figure out if it's worth supporting |
@nikolalsvk thank you ! yes it is in We will try this fix tomorrow. |
Thank you @nikolalsvk ! The quick fix works fine ! |
Hi !
I'm trying to handle more than one render_async in a single page and my site works with Turbolinks.
My render_async renderer have a
container_id
set as "render_async_{id}" to refresh them using javascript.Extract from my html file :
<%= render_async my_path(id), container_id: "render_async_#{id}", replace_container: false %>
In Javascript I do the following to refresh one given render_async :
When the page loads for the first time, everythings works fine, all my lists are loaded asynchronously and when I make an action changing one of the items of those lists, it is correctly refreshed.
But when I load the same page a second time without refreshing the page, just with navigation through turbolinks visits, all my lists are blank, no asynchronous action is launched.
I tried to remove the container_id from my render_async and the lists are correctly refreshed on turbolinks navigation, so I think the issue is related to container_id - not being properly used to refresh render_async blocks ?
Here is my config file :
I'm using turbolinks 5.2 and render_async 2.1.8.
Did you already encoutered this issue, and/or did I miss something ?
Thanks in advance !
The text was updated successfully, but these errors were encountered: