mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-05-09 04:59:19 -05:00
Add AutoComplete support to InputControl component
This commit is contained in:
@@ -8,14 +8,15 @@ import (
|
||||
)
|
||||
|
||||
type InputControlParams struct {
|
||||
Name string
|
||||
Label string
|
||||
Placeholder string
|
||||
Required bool
|
||||
Type inputType
|
||||
HelpText string
|
||||
Color color
|
||||
Children []gomponents.Node
|
||||
Name string
|
||||
Label string
|
||||
Placeholder string
|
||||
Required bool
|
||||
Type inputType
|
||||
HelpText string
|
||||
Color color
|
||||
AutoComplete string
|
||||
Children []gomponents.Node
|
||||
}
|
||||
|
||||
func InputControl(params InputControlParams) gomponents.Node {
|
||||
@@ -51,6 +52,10 @@ func InputControl(params InputControlParams) gomponents.Node {
|
||||
params.Required,
|
||||
html.Required(),
|
||||
),
|
||||
gomponents.If(
|
||||
params.AutoComplete != "",
|
||||
html.AutoComplete(params.AutoComplete),
|
||||
),
|
||||
gomponents.Group(params.Children),
|
||||
),
|
||||
gomponents.If(
|
||||
|
||||
Reference in New Issue
Block a user