mysterious-toddler-20573
10/07/2022, 1:38 PMmysterious-toddler-20573
10/07/2022, 1:38 PMechoing-dress-67727
10/07/2022, 1:42 PMmysterious-toddler-20573
10/07/2022, 1:43 PMmysterious-toddler-20573
10/07/2022, 1:43 PMhappy-pillow-29003
10/07/2022, 1:45 PM<li><label for="id_events_9"><input type="checkbox" name="events" value="102" hx-get="/participations/export/" hx-include="input[name="events"]" hx-target="#days-list" hx-trigger="change" id="id_events_9" class="field field--checkbox">
Event 1</label>
</li>
<li><label for="id_events_10"><input type="checkbox" name="events" value="98" hx-get="/participations/export/" hx-include="input[name="events"]" hx-target="#days-list" hx-trigger="change" id="id_events_10" class="field field--checkbox">
Event 2</label>
</li>
But then I added load
to the trigger and it triggered 50 requests on page load π
I ended up putting the hx
attributes on the parent element:
<div hx-get="/participations/export/" hx-include="input[name='events']" hx-trigger="load, change from:input[name='events']" hx-target="#days-list">
... all the <input name="events"> here
</div>
It seems to be working fine, but maybe thereβs a better way to do it?echoing-dress-67727
10/07/2022, 1:49 PMPOST
hasn't fired in the network tab. Then when I hit continue, the PATCH
goes out, then a moment later, the POST
goes out too. There's a very short delay between them. But the PATCH
definitely hasn't resolved yet when the POST
goes out, so it can't be anything to do with the response of that requestechoing-dress-67727
10/07/2022, 2:11 PMform.submit()
, which skips the submit
event πmysterious-toddler-20573
10/07/2022, 2:17 PMsparse-psychiatrist-6723
10/07/2022, 2:23 PMfreezing-waitress-26396
10/07/2022, 2:30 PMhalt
and trigger
with hyperscript where you can prevent default behavior if a certain condition is metfreezing-waitress-26396
10/07/2022, 2:32 PMhalt
, preventing a tab switch after changing something. Of course, whenever you save, you remove the respective class again.sparse-psychiatrist-6723
10/07/2022, 2:34 PMmysterious-toddler-20573
10/07/2022, 3:46 PMgreen-activity-6102
10/07/2022, 4:06 PMgreen-activity-6102
10/07/2022, 4:06 PMmysterious-toddler-20573
10/07/2022, 4:12 PMgreen-activity-6102
10/07/2022, 4:13 PMgreen-activity-6102
10/07/2022, 4:13 PMmysterious-toddler-20573
10/07/2022, 4:14 PMmysterious-toddler-20573
10/07/2022, 4:14 PMgreen-activity-6102
10/07/2022, 4:14 PMgreen-activity-6102
10/07/2022, 4:15 PMhx-target=".element:all"
mysterious-toddler-20573
10/07/2022, 4:15 PMmysterious-toddler-20573
10/07/2022, 4:15 PMgreen-activity-6102
10/07/2022, 4:17 PMgreen-activity-6102
10/07/2022, 4:17 PMgreen-activity-6102
10/07/2022, 4:17 PMbrainy-ice-92385
10/07/2022, 4:28 PMgreen-activity-6102
10/07/2022, 4:29 PM