Open ryands17 opened 4 weeks ago
Alpine AJAX simply uses Alpine Morph. Alpine Morph is a single function that doesn’t have a dependencies, so you should be able to import it and use it where you need to.
Does morph support options like Alpine-Ajax does, like appending to an element instead of entirely replacing it?
I would love if alpine-ajax expose the function that does this.
Ah, sorry, we don't have anything like that at the moment - but I'm looking into refactoring some things and exposing some of those core functions soon! In the meantime you can have a look at the merge
method in the code to get an idea how you could build implement something yourself: https://github.com/imacrayon/alpine-ajax/blob/main/src/index.js#L497-L534
I wanted to know if
alpine-ajax
supports morphing of elements from JS directly i.e. A JS API to do that from a script tag