-
Notifications
You must be signed in to change notification settings - Fork 0
/
grouped.go
71 lines (68 loc) · 1.33 KB
/
grouped.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package formselect
import app "github.com/maxence-charriere/go-app/v9/pkg/app"
type Grouped struct {
app.Compo
}
func (c *Grouped) Render() app.UI {
return app.Select().
Aria("label", "FormSelect Input").
Class("pf-c-form-control").
Aria("invalid", "false").
DataSet("ouia-component-type", "PF4/FormSelect").
DataSet("ouia-safe", true).
DataSet("ouia-component-id", "OUIA-Generated-FormSelect-default-7").
Body(
app.OptGroup().
Class("").
Label("Group1").
Body(
app.Option().
Class("").
Value("1").
Body(
app.Text("The first option"),
),
app.Option().
Class("").
Value("2").
Body(
app.Text("Second option is selected by default"),
),
),
app.OptGroup().
Class("").
Label("Group2").
Body(
app.Option().
Class("").
Value("3").
Body(
app.Text("The third option"),
),
app.Option().
Class("").
Value("4").
Body(
app.Text("The fourth option"),
),
),
app.OptGroup().
Disabled(true).
Class("").
Label("Group3").
Body(
app.Option().
Class("").
Value("5").
Body(
app.Text("The fifth option"),
),
app.Option().
Class("").
Value("6").
Body(
app.Text("The sixth option"),
),
),
)
}