diff options
author | Matti Tahvonen <matti@vaadin.com> | 2013-10-04 15:41:06 +0300 |
---|---|---|
committer | Matti Tahvonen <matti@vaadin.com> | 2013-10-09 16:31:21 +0300 |
commit | 1b7e40de9435f2584fe6c7f1b7f69cc448c16cc8 (patch) | |
tree | b7cb69dfbdef6133e99995cfc9b00117bc69e03a /client | |
parent | 3c842b76ed6ecbf3cf92cb9a7cca3b72e326a2ed (diff) | |
download | vaadin-framework-1b7e40de9435f2584fe6c7f1b7f69cc448c16cc8.tar.gz vaadin-framework-1b7e40de9435f2584fe6c7f1b7f69cc448c16cc8.zip |
Only fetch rows if there are some (#11189)
IE hacks cause calls to onScroll in situations where the cache row fetch
logic is not working correctly (causes JS exception). This change has an
optimization to pass this logic if there are no rows available and this
way fixes the JS exception as well.
Change-Id: I3425f3d75cad8b65e605638343b167abf7b48067
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 104cbbd5b9..0304acd590 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -6913,6 +6913,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // fix footers horizontal scrolling tFoot.setHorizontalScrollPosition(scrollLeft); + if (totalRows == 0) { + // No rows, no need to fetch new rows + return; + } + firstRowInViewPort = calcFirstRowInViewPort(); if (firstRowInViewPort > totalRows - pageLength) { firstRowInViewPort = totalRows - pageLength; |