We started using Hotwire in our new project and we’re loving it!
There’s an issue we’re currently having with Turbo, where Turbo Stream append only works at the first click. We have a donation.html page where the user can add fields via Turbo streams.
The donation.html.slim page looks like so:
turbo-frame#donation-rows = link_to t("custom"), custom_path(report_id: @report.id) #donation-row_1
turbo-stream action="append" target="donation-row_1" template #donation-row_1 | fields
After the user clicks on the button, Turbo frame changes and adds a src to it:
Is there something that we’re doing wrong or do we need to apply some changes to the code in order for it to work?
Any suggestions are greatly appreciated!
Have a nice weekend!