mysterious-toddler-20573
09/14/2022, 1:24 PMmysterious-toddler-20573
09/14/2022, 1:24 PMmysterious-toddler-20573
09/14/2022, 1:25 PMmysterious-toddler-20573
09/14/2022, 1:41 PMmysterious-toddler-20573
09/14/2022, 4:57 PMancient-shoe-86801
09/14/2022, 4:58 PMmysterious-toddler-20573
09/14/2022, 5:00 PMancient-shoe-86801
09/14/2022, 5:00 PMhundreds-camera-24900
09/14/2022, 6:07 PMhappy-knife-63802
09/15/2022, 10:54 AMmagnificent-boots-1658
09/15/2022, 2:01 PMsubmit
event on the <form>
element and preventDefault();
on it, I believe. In that event listener, you could check for your type="submit"
children and see if they're disabled, and use that information to decide whether to preventDefault
or not. Another option would be to respond to the htmx:oobAfterSettle
[sic] event and set the whole <form>
as disabled
(or not-disabled) based on the oob-swapped submit button's disablement.
(I forget what the specific oob after settle event name is in HTMX but it's something like that.)magnificent-boots-1658
09/15/2022, 2:03 PMsubmit
, you may even be able to express the above logic in a [filter]
on the hx-trigger
expression, though you may have to ask someone more familiar with that syntax how that'd be possible (@mysterious-toddler-20573?)happy-knife-63802
09/15/2022, 8:44 PMboundless-rocket-26534
09/16/2022, 9:49 AMcolossal-caravan-9184
09/16/2022, 5:49 PMmysterious-toddler-20573
09/16/2022, 6:04 PMcolossal-caravan-9184
09/16/2022, 6:04 PMmysterious-toddler-20573
09/16/2022, 6:25 PMhundreds-camera-24900
09/16/2022, 7:41 PMhundreds-camera-24900
09/16/2022, 7:42 PMhundreds-camera-24900
09/16/2022, 7:42 PMmysterious-toddler-20573
09/16/2022, 7:45 PMmysterious-toddler-20573
09/16/2022, 7:45 PMhundreds-camera-24900
09/16/2022, 7:45 PMmysterious-toddler-20573
09/16/2022, 7:45 PMhundreds-camera-24900
09/16/2022, 8:00 PMhundreds-camera-24900
09/16/2022, 8:00 PMfreezing-waitress-26396
09/16/2022, 8:21 PMhtmx:targetError
on my end, here's the markup:
<table class="table table-light" hx-target="closest tr" hx-swap="outerHTML">
<tbody class="sortable" hx-post="/items" hx-trigger="end">
<tr>...</tr>
<tr>...</tr>
</tbody>
</table>
<div class="htmx-indicator">
Updating...
</div>
Console:
elt: tbody.sortable
error: "htmx:targetError"
target: null
How can I find out more about this error?mysterious-toddler-20573
09/16/2022, 8:36 PMfreezing-waitress-26396
09/16/2022, 8:37 PM<form class="sortable" hx-post="/items" hx-trigger="end">