Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -520,13 +520,13 @@ public int getValueIndex(T value) {
*/
public void setSelectedIndex(int selectedIndex) {
this.selectedIndex = selectedIndex;
if (values.size() > 0) {
if (values.size() > selectedIndex) {
T value = values.get(selectedIndex);
if (value != null) {
$(listbox.getElement()).val(keyFactory.generateKey(value)).trigger("change.select2", selectedIndex);
} else {
GWT.log("Value index is not found.", new IndexOutOfBoundsException());
}
}
} else {
GWT.log("Value index is not found.", new IndexOutOfBoundsException());
}
}

Expand Down Expand Up @@ -689,4 +689,4 @@ public ReadOnlyMixin<MaterialComboBox, MaterialWidget> getReadOnlyMixin() {
}
return readOnlyMixin;
}
}
}