refined-pillow-25368
01/28/2023, 2:16 PMbland-coat-6833
01/28/2023, 2:25 PMbland-coat-6833
01/28/2023, 2:25 PMmysterious-toddler-20573
01/28/2023, 3:20 PMthrottle
? https://htmx.org/attributes/hx-trigger/mysterious-toddler-20573
01/28/2023, 4:54 PMsparse-musician-64201
01/28/2023, 4:56 PMsparse-musician-64201
01/28/2023, 4:57 PMrefined-waiter-90422
01/28/2023, 6:01 PMrefined-waiter-90422
01/28/2023, 6:03 PMrefined-waiter-90422
01/28/2023, 6:12 PMbusy-action-85810
01/28/2023, 6:17 PMhx-trigger="click, keyup[key == 'g' && key == 'n'] from:body"
I'm trying to mimic the behavior of services like Shortcut (creating a new task). If I don't use the conditional, it works fine. Example:
hx-trigger="click, keyup[key == 'n'] from:body"
Is it not possible to use two keys in succession or do you always need a modifier key first?refined-waiter-90422
01/28/2023, 6:19 PMmysterious-toddler-20573
01/28/2023, 6:23 PMmysterious-toddler-20573
01/28/2023, 6:23 PMrapid-oyster-80114
01/28/2023, 6:28 PMbreezy-salesclerk-70879
01/28/2023, 9:37 PMbreezy-salesclerk-70879
01/28/2023, 9:37 PMgorgeous-airport-54386
01/28/2023, 9:37 PMbreezy-salesclerk-70879
01/28/2023, 9:38 PMbreezy-salesclerk-70879
01/28/2023, 9:38 PMbreezy-salesclerk-70879
01/28/2023, 9:38 PMbreezy-salesclerk-70879
01/28/2023, 9:38 PMmysterious-toddler-20573
01/28/2023, 9:39 PMagreeable-apartment-19546
01/28/2023, 11:02 PMhtmx:configRequest
run at every request on the page ? Can I limit it to a specific POST ?green-activity-6102
01/28/2023, 11:44 PM?page=N
to the URL when I change pages
i also have buttons in the table which use hx-post
to perform updates in the DB and re-render the table in the response. I want to include the current URL query params in the POST body... Any suggestions? Should I try to use beforeRequest
to append my query params into the POST body?green-activity-6102
01/28/2023, 11:58 PMjavascript
event.detail.requestConfig.parameters[key] = value
gentle-salesclerk-37089
01/29/2023, 12:04 AMgentle-salesclerk-37089
01/29/2023, 12:04 AMclojure
[:div
[:a (cond->
{:data-testid "prev-button"
:href (str "/admin/jobs?limit=" limit "&offset=" (max 0 (- offset limit)))
:role "button"}
(= offset 0) (assoc :disabled "true"))
"Prev"]
[:a (cond->
{:data-testid "next-button"
:href (str "/admin/jobs?limit=" limit "&offset=" (+ offset limit))
:role "button"}
(< (count jobs) limit) (assoc :disabled "true"))
"Next"]]])))
gentle-salesclerk-37089
01/29/2023, 12:04 AMa
tag that has it in the hrefgentle-salesclerk-37089
01/29/2023, 12:05 AMclojure
[:button.inline-flex.items-center.justify-center.rounded-md.border.border-transparent.bg-indigo-600.px-4.py-2.text-sm.font-medium.text-white.shadow-sm.hover:bg-indigo-700.focus:outline-none.focus:ring-2.focus:ring-indigo-500.focus:ring-offset-2.sm:w-auto
{:data-testid (str feature-name "-toggle")
:hx-post "/admin/flags/toggle"
:hx-headers (cheshire/generate-string
{"X-XSRF-Token" anti-forgery-token})
:hx-vals (cheshire/generate-string {"feature-name" feature-name})
:hx-target "closest tr"
:hx-swap "outerHTML"
:type "button"}
"Toggle"]]]))