You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, love the plugin. Thanks so much for putting in the time.
Second, I’d love the ability to put modifiers on x-target based on the response code returned from the server, similar to htmx's response targets extension. Perhaps something like:
Perhaps something like this could be accomplished with intercepting the ajax:merge event with some custom retargeting? Either way, the Alpine modifier syntax would be some wonderful ergonomics.
Thanks again.
The text was updated successfully, but these errors were encountered:
mattwigham
changed the title
x-target modifiers
x-target response code modifiers
May 18, 2024
Interesting! I hadn’t come across that extension before.
It would be cool if we could hack this by intercepting ajax:merged, but unfortunately that event doesn’t allow the target to be changed.
I think I like where your idea is going. It might even be a better alternative to the current follow and nofollow modifiers, those modifiers have never really sat right with me, and maybe we could replace them with something like x-target.302="_top" which would reload the page if a form submission redirects.
First off, love the plugin. Thanks so much for putting in the time.
Second, I’d love the ability to put modifiers on
x-target
based on the response code returned from the server, similar to htmx's response targets extension. Perhaps something like:Perhaps something like this could be accomplished with intercepting the
ajax:merge
event with some custom retargeting? Either way, the Alpine modifier syntax would be some wonderful ergonomics.Thanks again.
The text was updated successfully, but these errors were encountered: