Skip to content

Commit

Permalink
fix: target selector datalist
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Aug 21, 2024
1 parent 3482984 commit f9d1a3e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/forms/datalist.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package forms

import (
"fmt"

htmx "github.com/zeiss/fiber-htmx"
"github.com/zeiss/pkg/utilx"
)
Expand Down Expand Up @@ -36,7 +38,7 @@ func Datalist(props DatalistProps, children ...htmx.Node) htmx.Node {
},
htmx.List(props.Name),
htmx.HxGet(props.URL),
htmx.HxTarget(props.ID),
htmx.HxTarget(fmt.Sprintf("#%s", props.ID)),
htmx.HxTrigger("load, keyup[checkUserKeydown.call(this, event)] changed delay:350ms"),
htmx.HxIndicator(utilx.IfElse(utilx.Empty(props.Indicator), htmx.HxClssNameIndicatorSelector, props.Indicator)),
),
Expand Down

0 comments on commit f9d1a3e

Please sign in to comment.