great-gold-37694
02/08/2023, 5:30 PMmysterious-toddler-20573
02/08/2023, 5:40 PMsparse-psychiatrist-6723
02/08/2023, 6:21 PMhx-target="closest tr"
hx-include="closest tr"
hx-validate="true"
It is working as far as my input field will turn red as the HTML 5 validation is catching my styling for input:invalid
, and as desired the hx-put is NOT triggering. However, I am not getting the browsers validation pop-up helpers. Any suggestions? I did try to wrap each input field in a form element but to no avail. Is the only way to hook into htmx:validation:failed
and show my own dialog?
Thanks for any suggestionsgreat-gold-37694
02/08/2023, 7:22 PMhx-push-url
if I'm making a GET request for html content that I'm injecting inside the SPA with a webcomponent I want to update the query params of the url but not the entire url.
When I click "Show Inactive" I want htmx to update the url bar with ?locked=true
but I don't want it to update the entire path nuking the hash routing that Elm needs to do it's thing.dazzling-shoe-67340
02/08/2023, 11:49 PMdazzling-shoe-67340
02/08/2023, 11:51 PMbroad-elephant-10716
02/09/2023, 2:42 AMbumpy-kangaroo-60192
02/09/2023, 4:58 AMbumpy-kangaroo-60192
02/09/2023, 5:04 AMbroad-elephant-10716
02/09/2023, 5:27 AMsalmon-church-58191
02/09/2023, 6:54 AMripe-action-67367
02/09/2023, 8:42 AMstyle="fill:white;...
(adjust the color to your needs) for all teeth
After that, you can add htmx attributes and it should work normallylittle-electrician-91324
02/09/2023, 10:50 AMhx-get="/contacts/?page=2"
is increased after the request when hx-swap="afterend"
. The docs says:
> The last element of the results will itself contain the listener to load the next page of results, and so on.
But it doesn't show how it's done, and you can't see it when opening the "Server request" page. Can anyone explain how it works?orange-umbrella-16693
02/09/2023, 11:10 AMhx-swap
only dictates where the element you receive from the server should be swapped in (in this case - right after the element containing the htmx attributes)orange-umbrella-16693
02/09/2023, 11:11 AMhx-get="/contacts/?page=2"
, so in the response the last element should have hx-get="/contacts/?page=3"
, and so on, where the page number in the URL search parameters is the page number of this request +1ripe-action-67367
02/09/2023, 12:00 PMripe-action-67367
02/09/2023, 12:00 PMmysterious-toddler-20573
02/09/2023, 2:27 PMrefined-manchester-67193
02/09/2023, 3:00 PM<script src="https://unpkg.com/htmx.org/dist/ext/ws.js">
Is there a minified version of this available anywhere that I can pull?ripe-action-67367
02/09/2023, 3:42 PMsome-airline-73512
02/09/2023, 6:53 PMmysterious-toddler-20573
02/09/2023, 7:10 PMbumpy-kangaroo-60192
02/09/2023, 9:52 PMbumpy-kangaroo-60192
02/09/2023, 9:55 PMhtmx.defineExtension("fi-svghack", {
onEvent: function(name, evt) {
if (name == 'htmx:confirm' && evt.detail.elt.tagName == 'a' && evt.detail.triggeringEvent.type == 'click') {
evt.detail.triggeringEvent.preventDefault()
}
}
})
bumpy-kangaroo-60192
02/09/2023, 9:55 PMbumpy-kangaroo-60192
02/09/2023, 9:56 PMable-secretary-52593
02/10/2023, 12:17 AMbusy-dinner-85754
02/10/2023, 1:58 AMbusy-dinner-85754
02/10/2023, 2:00 AM