diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java index 334b630724..544f041770 100644 --- a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -196,7 +196,7 @@ public class ComboBoxConnector extends AbstractListingConnector * the current filter string */ protected void setFilter(String filter) { - if (!Objects.equals(filter, getWidget().lastFilter)) { + if (!Objects.equals(filter, getState().currentFilterText)) { getDataReceivedHandler().clearPendingNavigation(); rpc.setFilter(filter); @@ -243,10 +243,9 @@ public class ComboBoxConnector extends AbstractListingConnector page = 0; } VComboBox widget = getWidget(); - int adjustment = widget.nullSelectionAllowed && filter.isEmpty() - ? 1 : 0; - int startIndex = Math.max(0, - page * widget.pageLength - adjustment); + int adjustment = widget.nullSelectionAllowed && filter.isEmpty() ? 1 + : 0; + int startIndex = Math.max(0, page * widget.pageLength - adjustment); int pageLength = widget.pageLength > 0 ? widget.pageLength : getDataSource().size(); getDataSource().ensureAvailability(startIndex, pageLength); |