summaryrefslogtreecommitdiffstats
path: root/compatibility-server
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2020-05-20 10:39:17 +0300
committerGitHub <noreply@github.com>2020-05-20 10:39:17 +0300
commit222705a48b80a23d6cd3f2884367a249a0130638 (patch)
tree4d19f3e00d906f153206c244944bda072dd6284e /compatibility-server
parent452357791fe20aae1e9b650c646bc70e8446d86c (diff)
downloadvaadin-framework-222705a48b80a23d6cd3f2884367a249a0130638.tar.gz
vaadin-framework-222705a48b80a23d6cd3f2884367a249a0130638.zip
Fix compatibility ComboBox filtering when page length is zero. (#12016)
Issue #11246, slightly modified cherry-pick from #11247
Diffstat (limited to 'compatibility-server')
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java
index aaccdb8b25..f502aedd8e 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java
@@ -620,7 +620,9 @@ public class ComboBox extends AbstractSelect
// page length usable for non-null items
int effectivePageLength = pageLength
- (needNullSelectOption && (currentPage == 0) ? 1 : 0);
- return Math.min(size - 1, first + effectivePageLength - 1);
+ // zero pageLength implies infinite page size
+ return pageLength == 0 ? size - 1
+ : Math.min(size - 1, first + effectivePageLength - 1);
}
/**