summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2018-02-27 17:05:22 +0200
committerIlia Motornyi <elmot@vaadin.com>2018-02-28 12:55:15 +0300
commitf31e0978958ba735824a0bcc51b0f18f1ea20b86 (patch)
treec76b60e96a0cf9e4752c9729246740801332a336 /client
parentf258ab8520c44c721b73bd12643798cf1740c919 (diff)
downloadvaadin-framework-f31e0978958ba735824a0bcc51b0f18f1ea20b86.tar.gz
vaadin-framework-f31e0978958ba735824a0bcc51b0f18f1ea20b86.zip
Fix client and server filter state mismatch in Combobox (#10630)
Fixes #10624
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java9
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);