ancient-shoe-86801
10/05/2022, 7:51 PMancient-shoe-86801
10/05/2022, 7:51 PMmysterious-toddler-20573
10/05/2022, 9:06 PMproud-librarian-99598
10/06/2022, 6:47 AM<meta name="htmx-config" content='{"useTemplateFragments": true}'>
<meta name="htmx-config" content='{"includeIndicatorStyles": false}'>
Or do you need to use a single htmx-config
meta tag with all options together?tall-dinner-62086
10/06/2022, 8:16 AMlate-king-98305
10/06/2022, 12:33 PMgreen-activity-6102
10/07/2022, 12:24 AMhx-disinherit="*"
seems to have no effect... what am i missing?green-activity-6102
10/07/2022, 12:24 AM<tr>
has hx-get
on it, but also one of <td>
cells in every row has special click behavior that i'd like to override with a different hx-get
green-activity-6102
10/07/2022, 12:50 AMhx-disinherit="*"
on both the parent (docs seem to indicate it belongs here) and the child -- neither worksmysterious-toddler-20573
10/07/2022, 1:14 AMmysterious-toddler-20573
10/07/2022, 1:15 AMmysterious-toddler-20573
10/07/2022, 1:15 AMmysterious-toddler-20573
10/07/2022, 1:15 AMhx-trigger
that lets you halt event bubblingmysterious-toddler-20573
10/07/2022, 1:16 AMmysterious-toddler-20573
10/07/2022, 1:16 AMconsume
mysterious-toddler-20573
10/07/2022, 1:16 AMhx-trigger="click consume"
on the child elementsgreen-activity-6102
10/07/2022, 1:26 AMgreen-activity-6102
10/07/2022, 1:26 AMgreen-activity-6102
10/07/2022, 1:29 AMgreen-activity-6102
10/07/2022, 1:29 AMmysterious-toddler-20573
10/07/2022, 1:37 AMancient-shoe-86801
10/07/2022, 3:16 AMmost-flag-2080
10/07/2022, 6:27 AMfreezing-waitress-26396
10/07/2022, 8:25 AMconsume
is a good thing yesblue-ghost-19146
10/07/2022, 10:58 AM"quoted"
values within hx-vals
cause a SyntaxError (htmx.min.js:1 SyntaxError: Expected ',' or '}' after property value in JSON at position 126
).
e.g. hx-vals='{"key": ""val""}'
where "val"
is user input.
Using Django's |escapejs
filter will escape the quotes appropriately: hx-vals='{"key": "\u0022val\u0022"}'
. This causes the request to work as expected. My question is: Is escaping the characters like this the correct approach, or am I missing something?happy-pillow-29003
10/07/2022, 1:16 PMhx-get="..."
to each checkbox results in multiple requests being sent to the server every time I check or uncheck a box, with only the value of the selected element. I’ve tried adding hx-include="input[name='foobar']"
which seems to add the other checkboxes values to the request, but it still sends multiple requestsechoing-dress-67727
10/07/2022, 1:23 PMPOST
request when I've got <form hx-patch="/whatever" action="#" method="post">
? The action
and method
get added by Rails, so I'm not sure if I can remove them. But I'm fairly certain this line should be preventing the POST
anyways https://github.com/bigskysoftware/htmx/blob/3c6b5996a147aa14da52f04c3b233a4778918181/src/htmx.js#L1302mysterious-toddler-20573
10/07/2022, 1:37 PMmysterious-toddler-20573
10/07/2022, 1:38 PMjs:
mysterious-toddler-20573
10/07/2022, 1:38 PM