Replies: 4 comments 6 replies
-
|
Related question about arbitrary execution that isn't ajax requests |
Beta Was this translation helpful? Give feedback.
-
|
This works, would have to do transition animations manually. <template
hx-trigger="propertyDeleted{{ .ID }} from:body"
hx-on::trigger="this.closest('#property{{ .ID }}').remove()"
>related: |
Beta Was this translation helpful? Give feedback.
-
|
Can put an empty data URL in hx-get so that it doesn't need an actual request: |
Beta Was this translation helpful? Give feedback.
-
|
One thing to consider is that - I think - removing an element outside of the normal HTMX swapping won't actually de-init the nodes. Which means, if you have event-bindings that have been setup outside of the nodes, such as with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have multiple instances of this component on page. I can respond to
hx-triggerevent of "propertyDeleted123" by making a dummyhx-getrequest to an endpoint that responds with nothing and swap it with nothing.But is there a way to not have to do the
hx-getand just remove an element after event triggers?Almost like if the trigger could execute arbitrary calls, maybe something with hyperscipt, or an
hx-executethat can hook into the trigger...Beta Was this translation helpful? Give feedback.
All reactions