powerful-evening-99811
02/23/2022, 3:53 AMblue-gold-89534
02/23/2022, 9:22 AMhtml
<div id="table"
hx-get="{% url 'foo' bar %}"
hx-trigger="load, every 30s">
</div>
Can I somehow trigger a load immediately by some server event?tall-dinner-62086
02/23/2022, 10:15 AMplain-kangaroo-26043
02/23/2022, 10:51 AMplain-kangaroo-26043
02/23/2022, 10:51 AMhttps://unpkg.com/htmx.org@1.7.0?metaplain-kangaroo-26043
02/23/2022, 10:52 AMhtml
<script src="https://unpkg.com/htmx.org@1.7.0"
integrity="sha384-EzBXYPt0/T6gxNp0nuPtLkmRpmDBbjg6WmCUZRLXBBwYYmwAUxzlSGej0ARHX0Bo"
crossorigin="anonymous"></script>cold-morning-35868
02/23/2022, 2:37 PMkeyup change delay:1s kind of trigger that initiates the validation server side, where (b) the response sets up a polling trigger to check for validation errors returned from the background task.
I'm struggling to wrap my head around how to best set this up, as clearly it's one or the other on a single <input>.
Ideally both these endpoints (or they can be one and the same) just return the complete rendered form field (the input as well as any validation errors) although I guess those details are framework specific (using Django, but asking here as I think it's a generic q).
Any thoughts?calm-ice-23682
02/23/2022, 3:08 PMhundreds-camera-24900
02/23/2022, 3:30 PMhundreds-camera-24900
02/23/2022, 3:31 PMhundreds-camera-24900
02/23/2022, 3:31 PMhallowed-insurance-17001
02/23/2022, 4:03 PMmysterious-toddler-20573
02/23/2022, 9:48 PMhundreds-camera-24900
02/23/2022, 9:49 PMhundreds-camera-24900
02/23/2022, 9:50 PMhundreds-camera-24900
02/23/2022, 9:50 PMmost-jelly-15242
02/23/2022, 10:31 PMgentle-notebook-11755
02/24/2022, 12:51 AMfast-nail-28668
02/24/2022, 1:42 AMgentle-notebook-11755
02/24/2022, 1:47 AMnarrow-evening-29329
02/24/2022, 2:30 AMgorgeous-ghost-95789
02/24/2022, 2:30 AMlate-king-98305
02/24/2022, 3:02 AMuser
02/24/2022, 4:57 AMrefined-waiter-90422
02/24/2022, 7:16 AMrefined-waiter-90422
02/24/2022, 7:17 AMrefined-waiter-90422
02/24/2022, 7:18 AMrefined-waiter-90422
02/24/2022, 7:21 AMblue-gold-89534
02/24/2022, 12:24 PMhtml
<div class="container-fluid LRpadding" hx-sse="connect:/notexistingchannel/">...</div>
and the channel "notexistingchannel" did not exist -> htmx threw an error (htmx1.6.1). After upgrading to htmx1.7.0 and using the code suggested in the docs:
html
<div hx-ext="sse" sse-connect="/notexistingchannel/" sse-swap="testing">...</div>
htmx1.7.0 ignores that this channel does not exist - is this by design? or did I miss something? I kind of liked the error.