]> source.dussan.org Git - vaadin-framework.git/commit
Re-adding all rows in Table causes table to loose scroll position (#14581)
authorAnna Miroshnik <anna.miroshnik@arcadia.spb.ru>
Mon, 15 Sep 2014 13:11:56 +0000 (17:11 +0400)
committerVaadin Code Review <review@vaadin.com>
Fri, 19 Sep 2014 09:46:24 +0000 (09:46 +0000)
commit98fa0cce8d5bb7de5b9d663786217d3508de8f21
tree43b11db78bf316d832bd4cdf2198133a0ed5bcf9
parent23d87699945d7fd773f71cf923bc173616608907
Re-adding all rows in Table causes table to loose scroll position (#14581)

Fix: if to remove (container.removeAllItems()) and then to re-add(container.addAll(..)) the same collection in table container - > scroll position is not loosed now.

The hash code and scroll position of the old container is stored when a new container is added.
If the new container has the same hash code, we restore the scroll position.
The scroll position is not restored if another items added to the container.

Change-Id: I52a22c3c1c7b71f1b3447b9d592ab8fececd67b8
server/src/com/vaadin/ui/Table.java
uitest/src/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRows.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/components/table/TableRepairsScrollPositionOnReAddingAllRowsTest.java [new file with mode: 0644]