diff options
author | mtzukanov <mtzukanov@vaadin.com> | 2014-03-21 12:15:43 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-04-25 15:34:56 +0000 |
commit | c8bc4d754c71edca898a0a29302169d07d78b2ab (patch) | |
tree | b470b283a7155bd70270513af385a5e226132c3c /client | |
parent | 6a67b0bf605ed1a17de48f3b355df398ed89a551 (diff) | |
download | vaadin-framework-c8bc4d754c71edca898a0a29302169d07d78b2ab.tar.gz vaadin-framework-c8bc4d754c71edca898a0a29302169d07d78b2ab.zip |
Fix ComboBox popup scrolling when paging disabled (#13488)
Added pagelength == 0 conditions on scroll and hasNextPage.
Change-Id: I42c0eb56d42cc54ff57a6bc6b9eee2f6734315bb
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VFilterSelect.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index e0ced98394..b68c978aee 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -453,7 +453,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, public void scrollUp() { debug("VFS.SP.LPS: scrollUp()"); - if (currentPage + pagesToScroll > 0) { + if (pageLength > 0 && currentPage + pagesToScroll > 0) { pagesToScroll--; cancel(); schedule(200); @@ -462,8 +462,9 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, public void scrollDown() { debug("VFS.SP.LPS: scrollDown()"); - if (totalMatches > (currentPage + pagesToScroll + 1) - * pageLength) { + if (pageLength > 0 + && totalMatches > (currentPage + pagesToScroll + 1) + * pageLength) { pagesToScroll++; cancel(); schedule(200); @@ -1217,7 +1218,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * last page */ public boolean hasNextPage() { - if (totalMatches > (currentPage + 1) * pageLength) { + if (pageLength > 0 && totalMatches > (currentPage + 1) * pageLength) { return true; } else { return false; |