diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-09-16 14:46:30 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-09-16 12:55:33 +0000 |
commit | d41455cc3e01a3e12727f948dcc3c5e9587a7530 (patch) | |
tree | dd27db6f88b44d4253595881f5b3124adb7cf34e | |
parent | 89df22ae86f870b984838940d73fbab0790452ca (diff) | |
download | vaadin-framework-d41455cc3e01a3e12727f948dcc3c5e9587a7530.tar.gz vaadin-framework-d41455cc3e01a3e12727f948dcc3c5e9587a7530.zip |
Fix RpcDataSourceConnector data handling when scrolling fast (#18909)
Change-Id: Ibd048b322497350cef4a5c2fa675a17912247b0f
-rw-r--r-- | client/src/com/vaadin/client/connectors/RpcDataSourceConnector.java | 2 | ||||
-rw-r--r-- | client/src/com/vaadin/client/data/AbstractRemoteDataSource.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/connectors/RpcDataSourceConnector.java b/client/src/com/vaadin/client/connectors/RpcDataSourceConnector.java index 5daa02c3bf..648aa2650b 100644 --- a/client/src/com/vaadin/client/connectors/RpcDataSourceConnector.java +++ b/client/src/com/vaadin/client/connectors/RpcDataSourceConnector.java @@ -236,7 +236,7 @@ public class RpcDataSourceConnector extends AbstractExtensionConnector { @Override protected void onDropFromCache(int rowIndex, JsonObject row) { - if (!((RowHandleImpl) getHandle(row)).isPinned()) { + if (!isPinned(row)) { droppedRowKeys.set(droppedRowKeys.length(), getRowKey(row)); } } diff --git a/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java index 58cd5c5f19..380531694d 100644 --- a/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java +++ b/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java @@ -763,4 +763,8 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> { return keyToIndexMap.get(rowKey); } } + + protected boolean isPinned(T row) { + return pinnedRows.containsKey(getRowKey(row)); + } } |