Replies: 1 comment 1 reply
-
Hey, you'll likely be interested in issue #1597 as well as the ongoing (though likely inactive?) PR #2326 ! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I love that we can use CSS selectors for many things in the htmx world. So nice! But, as I'm learning about the
hx-disabled-elt
functionality, I'm feeling like there's a middle ground for something that's not supported. Considering wanting to disable all the buttons inside a form during a submissions process. I have two obvious options:<form hx-disabled-elt="find button"
- disables the first button it finds.<form hx-disabled-elt="button"
- disables all buttons, even if not inside the form.There's no easy way to disable all buttons inside a form without having to add an
id
to the form itself and then use that in the selector:<form id="my-form" hx-disabled-elt="#my-form button"
It would be great if either we could add a
findall
/findmany
that would do a relative CSS search, but not stop at the first element:<form hx-disabled-elt="findall button"
Or, maybe allow the
this
helper to be used as the root of a CSS selector path (like hownext
andprevious
work). Then would just do:<form hx-disabled-elt="this button"
Just throwing that out there as an idea to make this a tiny bit easier.
Beta Was this translation helpful? Give feedback.
All reactions