Skip to content

Commit 8165534

Browse files
Fix typo in hx-disabled-elt (#12)
It's _disabled_, not _disable_.
2 parents 5d4a74f + 68e1dbc commit 8165534

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

htmx.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ func Disable(v string) g.Node {
100100

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

107107
// Disinherit controls and disables automatic attribute inheritance for child nodes.

htmx_test.go

+32-32
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,38 @@ import (
1414

1515
func TestAttributes(t *testing.T) {
1616
cases := map[string]func(string) g.Node{
17-
"boost": hx.Boost,
18-
"get": hx.Get,
19-
"post": hx.Post,
20-
"push-url": hx.PushURL,
21-
"select": hx.Select,
22-
"select-oob": hx.SelectOOB,
23-
"swap": hx.Swap,
24-
"swap-oob": hx.SwapOOB,
25-
"target": hx.Target,
26-
"trigger": hx.Trigger,
27-
"vals": hx.Vals,
28-
"confirm": hx.Confirm,
29-
"delete": hx.Delete,
30-
"disable": hx.Disable,
31-
"disable-elt": hx.DisableElt,
32-
"disinherit": hx.Disinherit,
33-
"encoding": hx.Encoding,
34-
"ext": hx.Ext,
35-
"headers": hx.Headers,
36-
"history": hx.History,
37-
"history-elt": hx.HistoryElt,
38-
"include": hx.Include,
39-
"indicator": hx.Indicator,
40-
"params": hx.Params,
41-
"patch": hx.Patch,
42-
"preserve": hx.Preserve,
43-
"prompt": hx.Prompt,
44-
"put": hx.Put,
45-
"replace-url": hx.ReplaceURL,
46-
"request": hx.Request,
47-
"sync": hx.Sync,
48-
"validate": hx.Validate,
17+
"boost": hx.Boost,
18+
"get": hx.Get,
19+
"post": hx.Post,
20+
"push-url": hx.PushURL,
21+
"select": hx.Select,
22+
"select-oob": hx.SelectOOB,
23+
"swap": hx.Swap,
24+
"swap-oob": hx.SwapOOB,
25+
"target": hx.Target,
26+
"trigger": hx.Trigger,
27+
"vals": hx.Vals,
28+
"confirm": hx.Confirm,
29+
"delete": hx.Delete,
30+
"disable": hx.Disable,
31+
"disabled-elt": hx.DisabledElt,
32+
"disinherit": hx.Disinherit,
33+
"encoding": hx.Encoding,
34+
"ext": hx.Ext,
35+
"headers": hx.Headers,
36+
"history": hx.History,
37+
"history-elt": hx.HistoryElt,
38+
"include": hx.Include,
39+
"indicator": hx.Indicator,
40+
"params": hx.Params,
41+
"patch": hx.Patch,
42+
"preserve": hx.Preserve,
43+
"prompt": hx.Prompt,
44+
"put": hx.Put,
45+
"replace-url": hx.ReplaceURL,
46+
"request": hx.Request,
47+
"sync": hx.Sync,
48+
"validate": hx.Validate,
4949
}
5050

5151
for name, fn := range cases {

0 commit comments

Comments
 (0)