turbolinks icon indicating copy to clipboard operation
turbolinks copied to clipboard

Need example of Livewire form + Turbo (frame)...tnx

Open cjaoude opened this issue 3 years ago • 5 comments

Need example of Livewire form + Turbo (frame). It's become a blocker. I've tried marking the form with data-turbo="false" but seems to be ignored. Turbo seems to want to take over no matter what. :/

Frankly, with the issues at Basecamp, Livewire should step up with a SPA solution. Only reason I'm using Turbo, I think Livewire is the shiznit. @calebporzio 👍

cjaoude avatar May 03 '21 01:05 cjaoude

Thanks @cjaoude , and I totally agree

calebporzio avatar May 03 '21 14:05 calebporzio

Hey, @cjaoude I've added an example to the Turbo Laravel app of using a Livewire component with a form inside that seems to not conflict with Turbo at all, even when inside a Turbo Frame.

Here's the commit, and it's deployed to the demo app here.

Video Example

https://user-images.githubusercontent.com/1178621/118580853-00ed5380-b767-11eb-8463-aad1e06e3bc5.mp4

tonysm avatar May 18 '21 02:05 tonysm

Any way to avoid having to add data-turbo="false" to every single livewire form element? That seems to be the magic according to your commit.

Hey, @cjaoude I've added an example to the Turbo Laravel app of using a Livewire component with a form inside that seems to not conflict with Turbo at all, even when inside a Turbo Frame.

Here's the commit, and it's deployed to the demo app here.

Video Example

Any way to avoid having to add data-turbo="false" to every single livewire form in livewire? That seems to be the magic according to your commit.

MACscr avatar Jun 06 '21 15:06 MACscr

Not that I know of. Unless there is a way to hook into the Livewire rendering and automatically add data-turbo="false" to forms inside a Livewire component. Not sure if this is possible, though.

tonysm avatar Jun 06 '21 19:06 tonysm

Unless im missing something, you arent actually doing anything with that turbo frame like switching content within it and then trying to use livewire within that frame. Thats where im finding it fails.

MACscr avatar Jun 08 '21 08:06 MACscr