Skip to content

Commit

Permalink
Added hx-disable-elt attribute (#11)
Browse files Browse the repository at this point in the history
This feature was added in the following PR:
bigskysoftware/htmx@af0dc9c.

See https://htmx.org/attributes/hx-disabled-elt/
  • Loading branch information
markuswustenberg authored Feb 20, 2024
2 parents 1e64832 + 1be54fa commit 5d4a74f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htmx.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ func Disable(v string) g.Node {
return attr("disable", v)
}

// Disable element until htmx request completes.
// See https://htmx.org/attributes/hx-disabled-elt/
func DisableElt(v string) g.Node {
return attr("disable-elt", v)
}

// Disinherit controls and disables automatic attribute inheritance for child nodes.
// See https://htmx.org/attributes/hx-disinherit
func Disinherit(v string) g.Node {
Expand Down
1 change: 1 addition & 0 deletions htmx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestAttributes(t *testing.T) {
"confirm": hx.Confirm,
"delete": hx.Delete,
"disable": hx.Disable,
"disable-elt": hx.DisableElt,
"disinherit": hx.Disinherit,
"encoding": hx.Encoding,
"ext": hx.Ext,
Expand Down

0 comments on commit 5d4a74f

Please sign in to comment.