Skip to content

Commit 56e6b5e

Browse files
committed
Updated ComboBox demo to have Single Placeholder demo and showcase.
1 parent 1ada6d9 commit 56e6b5e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/main/java/gwt/material/design/demo/client/application/addins/combobox/ComboBoxView.ui.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,29 @@
5555
</m:MaterialColumn>
5656
</m:MaterialRow>
5757

58+
<m:MaterialRow addStyleNames="code">
59+
<m:MaterialBadge text="FEATURE UPDATE" textColor="AMBER" shadow="1" layoutPosition="RELATIVE" float="RIGHT" backgroundColor="AMBER_LIGHTEN_5" />
60+
<m:MaterialTitle title="Placeholder : Singe Selection" description="Note that because browsers assume the first option element is selected in non-multi-value select boxes an empty first option element must be provided for the placeholder to work." />
61+
<m:MaterialColumn grid="l6 m6 s12">
62+
<combobox:MaterialComboBox placeholder="This is a placeholder" allowClear="true">
63+
<m:html.Option text="" />
64+
<m:html.Option text="Item 1" />
65+
<m:html.Option text="Item 2" />
66+
<m:html.Option text="Item 3" />
67+
</combobox:MaterialComboBox>
68+
</m:MaterialColumn>
69+
<m:MaterialColumn grid="l12 m12 s12">
70+
<demo:PrettyPre addStyleNames="lang-xml">
71+
&emsp;&lt;combobox:MaterialComboBox placeholder="This is a placeholder" allowClear="true"><br/>
72+
&emsp;&lt;m:html.Option text="" /><br/>
73+
&emsp;&lt;m:html.Option text="Item 1" /><br/>
74+
&emsp;&lt;m:html.Option text="Item 2" /><br/>
75+
&emsp;&lt;m:html.Option text="Item 3" /><br/>
76+
&lt;/combobox:MaterialComboBox><br/>
77+
</demo:PrettyPre>
78+
</m:MaterialColumn>
79+
</m:MaterialRow>
80+
5881
<m:MaterialRow addStyleNames="code">
5982
<m:MaterialColumn grid="l12 m12 s12">
6083
<m:MaterialTitle title="Java : Adding Options" description="Populating your data can be done using java. By calling combobox.addItem(String, T)" />

0 commit comments

Comments
 (0)