polypush135
It would look as if there is a new way to initialize Alpine js
The key takeaway is that now you have to call Alpine.start() after you import.
I’ve noticed that the use of Alpine.clone does not seem to be enough alone anymore.
My Alpine js works for everything outside of LV but for dom elms inside they get blown aways after the call to clone. I bet I’m just missing one more step that’s required to re initialize the alpine js elements.
Has anyone else figured this out yet?
Edit: calling Alpine.start from the console does seem to work to re initialize
but I guess its not enough to call it from onBeforeElUpdated? I guess I should find a onAfterElUpdated
Edit: I’ve tried to call from both onElUpdated and onNodeAdded with no luck ![]()
Edit Edit:
The solution was seen here.
Its in the way we watch the dom that has changed.
onBeforeElUpdated(from, to) {
if (!window.Alpine) return;
if (from.nodeType !== 1) return;
// AlpineJS v2
if (from.__x) window.Alpine.clone(from.__x, to);
// AlpineJS v3
if (from._x_dataStack) window.Alpine.clone(from, to);
},
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
polypush135
The solution is simply
cigrainger
We used that solution and it caused some major problems. Namely with
mark.js. But generally things like empty selections.