x-target and x-arrange aren't alpine directive
delaneyj opened this issue · comments
Curious about this, also because x-arrange will never be used without x-target would it be x-target.prepend.focus:foo
x-target
and x-arrange
are most often used together, but you can also combine x-arrange
with x-sync
.
A single x-target
can also map to multiple x-arrange
“containers” like this:
<form x-target=“notifications comments”>…</form>
<div id=“notifications” x-arrange=“append”>…</div>
<div id=“comments” x-arrange=“morph”>…</div>
for those use cases I think a separate attribute still makes sense.
As for them not being true directives, I don’t really have a good excuse 🙂. Alpine AJAX has gone through some API changes and the x-
prefix has just stuck around. However, we can’t rename x-target
to target
because it would conflict with HTML’s target
. Maybe one day they’ll need some modifiers or something 🤷🏼♂️
I think I was able to clear this up more in our discord chat, I'm going to close this issue out and I created #25 as a follow up.
Will be release in v0.3