You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, not quite sure how to word the title. But essentially:
A Rails 7.0.4 demp app (using the latest turbo-rails) with a very simple model and index page that contains the list of objects inside the turbo_frame_tag. There is a Chartkick chart outside the frame in another part of the page.
Refreshing doing a form-driven update of the turbo frame causes the Chart to lose its content.
It is exactly the same as described in issue #125 (which was closed almost 2 years ago).
@philsmy Just encounter very similar issue. After some digging in, it seems that chartkick is listening to turbo:before-render hook and calling Chartkick.destroyAll(). This will affect all the charts, even the ones outside of the frame.
What's more, recent changes caused inline script tags to execute before turbo:before-render, meaning that graphs inside the frame are destroyed as soon as they're created - I will raise another issue for this one.
Anyway, there's an option to disable autoDestroy with Chartkick.config.autoDestroy = false, but you'd need to handle destroying deleted graphs by yourself.
Sorry, not quite sure how to word the title. But essentially:
A Rails 7.0.4 demp app (using the latest turbo-rails) with a very simple model and index page that contains the list of objects inside the
turbo_frame_tag
. There is aChartkick
chart outside the frame in another part of the page.Refreshing doing a form-driven update of the turbo frame causes the Chart to lose its content.
It is exactly the same as described in issue #125 (which was closed almost 2 years ago).
I have a repository here that shows the error: https://github.com/philsmy/hotwire_demo
The text was updated successfully, but these errors were encountered: