Replies: 4 comments
-
Thanks! Glad to hear you are finding it useful. Try replacing the |
Beta Was this translation helpful? Give feedback.
-
Yes, that was the issue. I was just coming here to write that! Thanks :D |
Beta Was this translation helpful? Give feedback.
-
Oh, and in yoyo.js there is indeed some stuff specific for Alpine, but you need to also load morphdom on your own and change the swap style in the Yoyo component to morphdom: <div yoyo:swap="morphdom">...</div> I haven't finalized this because there's an open issue bigskysoftware/htmx#214 What this would do is retain the previous Alpine component data state even after the swap. So if you have open = true before the swap, that will be remembered instead of changing back to false. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the background on all that. We're going to skip using Alpine heavily for now. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I installed alpine.js as per the example app, and can get the alpine example dropdown working on a static twig template, but not within a yoyo component template. Seems like the re-rendering of the component is causing something about the alpine code not to run:
I tried to reinstantiate alpine with
Alpine.discoverUninitializedComponents(function(el){ Alpine.initializeComponent(el) })
after the component renders, but doesn't seem to make a difference. I see in yoyo.js - the handleswap function seems to attempt to fix this but can't get it to fire?Thanks!
Btw - great framework
Pieter
Beta Was this translation helpful? Give feedback.
All reactions