Previews

No matching results.

x
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="country">Country</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="Canada" class="Polaris-Select">
<select name="country" id="country" class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update"><optgroup label="North America"><option value="US">United States</option>
<option selected="selected" value="Canada">Canada</option></optgroup><optgroup label="Europe"><option value="Denmark">Denmark</option>
<option value="Germany">Germany</option>
<option value="France">France</option></optgroup></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
["United States", "US"]
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
<br>
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="country">Country</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="Canada" class="Polaris-Select">
<select name="country" id="country" class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update"><option value="">Select country</option><optgroup label="North America"><option value="US">United States</option>
<option selected="selected" value="Canada">Canada</option></optgroup><optgroup label="Europe"><option value="Denmark">Denmark</option>
<option value="Germany">Germany</option>
<option value="France">France</option></optgroup></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
["United States", "US"]
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
<br>
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text" for="country">Country</label>
</div>
</div>
<div data-controller="polaris-select" data-selected-value="" class="Polaris-Select">
<select name="country" id="country" class="Polaris-Select__Input" data-polaris-select-target="select" data-action="polaris-select#update"><option value="">Select country</option><optgroup label="---------"><option value="US">United States</option>
<option value="Canada">Canada</option></optgroup><optgroup label="---------"><option value="Denmark">Denmark</option>
<option value="Germany">Germany</option>
<option value="France">France</option></optgroup></select>
<div
class="Polaris-Select__Content"
aria-hidden="true"
>
<span
class="Polaris-Select__SelectedOption"
data-polaris-select-target="selectedOption"
>
[[["United States", "US"], "Canada"], ["Denmark", "Germany", "France"]]
</span>
<span class="Polaris-Select__Icon">
<span class="Polaris-Icon">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true">
<path d="M10 16l-4-4h8l-4 4zm0-12l4 4H6l4-4z"></path>
</svg>
</span> </span>
</div>
<div class="Polaris-Select__Backdrop"></div>
</div>
</div>
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
<%= polaris_select(
name: :country,
label: "Country",
grouped: true,
options: {
'North America' => [['United States','US'], 'Canada'],
'Europe' => ['Denmark','Germany','France']
},
selected: "Canada"
) %>
<br>
<%= polaris_select(
name: :country,
label: "Country",
grouped: true,
options: [
['North America',
[['United States','US'],'Canada']],
['Europe',
['Denmark','Germany','France']]
],
selected: "Canada",
prompt: "Select country"
) %>
<br>
<%= polaris_select(
name: :country,
label: "Country",
grouped: true,
options: [
[['United States','US'], 'Canada'],
['Denmark','Germany','France']
],
prompt: "Select country",
divider: "---------"
) %>