Skip to content

Commit 85493ae

Browse files
committed
Add MaterialComboBox Tagging support demo showcase and codeblocks.
1 parent ff09744 commit 85493ae

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ interface Binder extends UiBinder<Widget, ComboBoxView> {
4747

4848
@UiField
4949
MaterialComboBox<String> comboTimeZone, comboTimeZone1, comboTimeZone2, comboTimeZone3, comboTimeZone4,
50-
comboTimeZone6, comboTimeZone7;
50+
comboTimeZone6, comboTimeZone7, comboTags, comboTagsMultiple;
5151

5252
@UiField
5353
MaterialComboBox<State> comboTimeZone8, comboTimeZone8_1, comboTimeZone9, comboTimeZone9_1, comboTimeZone10,
@@ -90,6 +90,8 @@ protected void populateTimeZones() {
9090
addStateItems(comboTimeZone17);
9191
addStateItems(comboValue);
9292
addItemsWithoutGroup(comboCloseOnSelect);
93+
addStringItems(comboTags);
94+
addStringItems(comboTagsMultiple);
9395

9496
comboTimeZone8.addValueChangeHandler(valueChangeEvent -> {
9597
MaterialToast.fireToast("Event: ValueChange State : " + comboTimeZone8.getSingleValue().getName() + " Value: " + comboTimeZone8.getSingleValue().getValue());

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,20 @@
225225
</m:MaterialColumn>
226226
</m:MaterialRow>
227227

228+
<m:MaterialRow addStyleNames="code">
229+
<m:MaterialBadge text="FEATURE UPDATE" textColor="AMBER" shadow="1" layoutPosition="RELATIVE" float="RIGHT" backgroundColor="AMBER_LIGHTEN_5" />
230+
<m:MaterialColumn grid="l6 m6 s12">
231+
<m:MaterialTitle title="Tag Support" description="Note that when tagging is enabled the user can select from pre-existing options or create a new tag by picking the first choice, which is what the user has typed into the search box so far."/>
232+
<combobox:MaterialComboBox closeOnSelect="true" tags="true" placeholder="Time Zone" multiple="true" ui:field="comboTagsMultiple" />
233+
<combobox:MaterialComboBox closeOnSelect="true" tags="true" placeholder="Time Zone" ui:field="comboTags" />
234+
</m:MaterialColumn>
235+
<m:MaterialColumn grid="s12">
236+
<demo:PrettyPre addStyleNames="lang-xml">
237+
&emsp;&lt;combobox:MaterialComboBox tags="true" closeOnSelect="false" multiple="true" placeholder="Time Zone" />
238+
</demo:PrettyPre>
239+
</m:MaterialColumn>
240+
</m:MaterialRow>
241+
228242
<m:MaterialRow addStyleNames="code">
229243
<m:MaterialColumn grid="l6 m6 s12">
230244
<m:MaterialTitle title="Close On Select" description="Allow or Prevent the dropdown from closing when a result is selected (Default : true)"/>

0 commit comments

Comments
 (0)