Blogmark
Making Tables Work with Turbo
via jbranchaud@gmail.com
https://www.guillermoaguirre.dev/articles/making-tables-work-with-turbo
Ruby on Rails
Hotwire
Turbo
This article shows how to work around some gotchas that come up when using Turbo with HTML tables. The issue is that despite how you structure your HTML, some elements like <form>
get shifted around or de-nested by the HTML rendering engine.
Some of the key takeaways:
- take advantage of the dom_id helper
- stream to an ID on a standard tag without necessarily having added a turbo_frame_tag
- use of remote form submission by specifying the form ID to the submit button's form
attribute