Skip to content

Commit

Permalink
Fix typo in hx-disabled-elt (#12)
Browse files Browse the repository at this point in the history
It's _disabled_, not _disable_.
  • Loading branch information
markuswustenberg committed Feb 21, 2024
2 parents 5d4a74f + 68e1dbc commit 8165534
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions htmx.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func Disable(v string) g.Node {

// 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)
func DisabledElt(v string) g.Node {
return attr("disabled-elt", v)
}

// Disinherit controls and disables automatic attribute inheritance for child nodes.
Expand Down
64 changes: 32 additions & 32 deletions htmx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,38 @@ import (

func TestAttributes(t *testing.T) {
cases := map[string]func(string) g.Node{
"boost": hx.Boost,
"get": hx.Get,
"post": hx.Post,
"push-url": hx.PushURL,
"select": hx.Select,
"select-oob": hx.SelectOOB,
"swap": hx.Swap,
"swap-oob": hx.SwapOOB,
"target": hx.Target,
"trigger": hx.Trigger,
"vals": hx.Vals,
"confirm": hx.Confirm,
"delete": hx.Delete,
"disable": hx.Disable,
"disable-elt": hx.DisableElt,
"disinherit": hx.Disinherit,
"encoding": hx.Encoding,
"ext": hx.Ext,
"headers": hx.Headers,
"history": hx.History,
"history-elt": hx.HistoryElt,
"include": hx.Include,
"indicator": hx.Indicator,
"params": hx.Params,
"patch": hx.Patch,
"preserve": hx.Preserve,
"prompt": hx.Prompt,
"put": hx.Put,
"replace-url": hx.ReplaceURL,
"request": hx.Request,
"sync": hx.Sync,
"validate": hx.Validate,
"boost": hx.Boost,
"get": hx.Get,
"post": hx.Post,
"push-url": hx.PushURL,
"select": hx.Select,
"select-oob": hx.SelectOOB,
"swap": hx.Swap,
"swap-oob": hx.SwapOOB,
"target": hx.Target,
"trigger": hx.Trigger,
"vals": hx.Vals,
"confirm": hx.Confirm,
"delete": hx.Delete,
"disable": hx.Disable,
"disabled-elt": hx.DisabledElt,
"disinherit": hx.Disinherit,
"encoding": hx.Encoding,
"ext": hx.Ext,
"headers": hx.Headers,
"history": hx.History,
"history-elt": hx.HistoryElt,
"include": hx.Include,
"indicator": hx.Indicator,
"params": hx.Params,
"patch": hx.Patch,
"preserve": hx.Preserve,
"prompt": hx.Prompt,
"put": hx.Put,
"replace-url": hx.ReplaceURL,
"request": hx.Request,
"sync": hx.Sync,
"validate": hx.Validate,
}

for name, fn := range cases {
Expand Down

0 comments on commit 8165534

Please sign in to comment.