most-jelly-15242
12/25/2020, 8:35 PMonclick
attribute to disable the button, then replace it with a non-disabled version on swap. Demo here https://codepen.io/jreviews/pen/ExgbvvWgorgeous-ghost-95789
12/25/2020, 10:25 PMhtml
<button hx-post="/server" _="on htmx:beforeRequest take .hidden from .buttons">Do The Thing</button>
<button class="hidden">I'm Doing the Thing...</button>
gorgeous-ghost-95789
12/25/2020, 10:27 PMmysterious-toddler-20573
12/25/2020, 11:28 PMhtmx-request
class should only be added to the element making the request, unless you use the hx-indicator
attribute: https://htmx.org/docs/#indicatorsmysterious-toddler-20573
12/25/2020, 11:30 PMmysterious-toddler-20573
12/25/2020, 11:32 PMjs
<div hx-post="/example" hx-trigger="click serial">
Only One Request At A Time Please
</div>
gorgeous-ghost-95789
12/26/2020, 12:31 AMgorgeous-ghost-95789
12/26/2020, 12:32 AM<body hx-serial="true">
adamant-exabyte-92636
12/26/2020, 11:59 AMpushUrl.ic(evt, target, data)
event we have in Intercooler, to trap a url push?adamant-exabyte-92636
12/26/2020, 12:03 PMhtmx:beforeHistorySave
?adamant-exabyte-92636
12/26/2020, 12:06 PMbeforeHistorySnapshot.ic(evt, target)
instead?adamant-exabyte-92636
12/26/2020, 12:54 PMtriggerEvent(getDocument().body, 'htmx:pushedIntoHistory', {path:pathToPush});
Seems like this would be the equivalent event to Intercooler's pushUrl.ic(evt, target, data)
event, correct? Just not documented yet?adamant-exabyte-92636
12/26/2020, 1:26 PMpath-deps
extension, what is the equivalent action/mechanism for programatically triggering refreshes on a path, a la Intercooler.refresh(eltOrPath)
?salmon-xylophone-28580
12/26/2020, 7:25 PMhx-disable-and-hourglass
.
Of course I could write a method like this myself, but the big benefit would be a standardization.gorgeous-ghost-95789
12/26/2020, 7:27 PMgorgeous-ghost-95789
12/26/2020, 7:28 PMgorgeous-ghost-95789
12/26/2020, 7:30 PMgorgeous-ghost-95789
12/26/2020, 7:31 PMhx-disable-and-hourglass
we'd probably add some kind of additional css class (see https://htmx.org/reference/#classes) and let developers write their own stylesheets to use it.mysterious-toddler-20573
12/26/2020, 8:01 PMmysterious-toddler-20573
12/26/2020, 8:01 PMmysterious-toddler-20573
12/26/2020, 8:01 PMadamant-exabyte-92636
12/26/2020, 8:05 PMadamant-exabyte-92636
12/26/2020, 8:08 PMgorgeous-ghost-95789
12/26/2020, 8:09 PMgorgeous-ghost-95789
12/26/2020, 8:10 PMgorgeous-ghost-95789
12/26/2020, 8:11 PMmysterious-toddler-20573
12/26/2020, 8:11 PMmysterious-toddler-20573
12/26/2020, 8:12 PMmysterious-toddler-20573
12/26/2020, 8:12 PMmysterious-toddler-20573
12/26/2020, 8:12 PM