D3vugu-components/page-input.go
David Vogel 25f6c47602 Add dropdown component
- Add list binder interface
- Update input example page
2023-05-27 13:37:40 +02:00

23 lines
588 B
Go

package main
import "github.com/vugu/vugu"
type PageInput struct {
button1Counter int `vugu:"data"`
button4Bool bool `vugu:"data"`
inputField1String string `vugu:"data"`
inputField2Int int `vugu:"data"`
inputField3Float float64 `vugu:"data"`
inputField4String string `vugu:"data"`
inputField5String string `vugu:"data"`
inputField5Bool bool `vugu:"data"`
dropdown1Slice []string `vugu:"data"`
dropdown1Index int `vugu:"data"`
}
func (c *PageInput) Init(ctx vugu.InitCtx) {
c.dropdown1Slice = []string{"This", "is", "a", "list", "of", "things!"}
}