Skip to content

Commit 5d4a74f

Browse files
Added hx-disable-elt attribute (#11)
This feature was added in the following PR: bigskysoftware/htmx@af0dc9c. See https://htmx.org/attributes/hx-disabled-elt/
2 parents 1e64832 + 1be54fa commit 5d4a74f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

htmx.go

+6
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ func Disable(v string) g.Node {
9898
return attr("disable", v)
9999
}
100100

101+
// Disable element until htmx request completes.
102+
// See https://htmx.org/attributes/hx-disabled-elt/
103+
func DisableElt(v string) g.Node {
104+
return attr("disable-elt", v)
105+
}
106+
101107
// Disinherit controls and disables automatic attribute inheritance for child nodes.
102108
// See https://htmx.org/attributes/hx-disinherit
103109
func Disinherit(v string) g.Node {

htmx_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func TestAttributes(t *testing.T) {
2828
"confirm": hx.Confirm,
2929
"delete": hx.Delete,
3030
"disable": hx.Disable,
31+
"disable-elt": hx.DisableElt,
3132
"disinherit": hx.Disinherit,
3233
"encoding": hx.Encoding,
3334
"ext": hx.Ext,

0 commit comments

Comments
 (0)