I think, there is an issue in grids, using pagination and user specified sorting.
I used a grid with three columns that was filled by a DataProvider, that uses pagination. The DataProvider itself uses an JpaRepository to obtain its data.
If the grid ist sorted by "column 1" in ascending order, the grid works fine. Sorting the grid by "column 2" or even the id column in descending order and scrolling up and down leads to absolutely unsorted and unexpected results.
The reason for the unexpeced results lies in the fact, that the grid does not give the information about its sort columns and their direction to the underlying DataProvider. The Query-Object, that is passed to the Dataprovider in its fetch-method is always an empty array. I think it should contain informations about the columns, the table should be sorted by.
An example project to reproduce the issue is contained in die attached zip file.
gridtest.zip
The issue occures in vaadin version 11.0.1 and 10.0.3 running it inside an spring boot application with the embedded tomcat. It can be reproduced in any browser.
@chrlembeck commented on Sun Sep 30 2018
I think, there is an issue in grids, using pagination and user specified sorting.
I used a grid with three columns that was filled by a DataProvider, that uses pagination. The DataProvider itself uses an JpaRepository to obtain its data.
If the grid ist sorted by "column 1" in ascending order, the grid works fine. Sorting the grid by "column 2" or even the id column in descending order and scrolling up and down leads to absolutely unsorted and unexpected results.
The reason for the unexpeced results lies in the fact, that the grid does not give the information about its sort columns and their direction to the underlying DataProvider. The Query-Object, that is passed to the Dataprovider in its fetch-method is always an empty array. I think it should contain informations about the columns, the table should be sorted by.
An example project to reproduce the issue is contained in die attached zip file. gridtest.zip
It can also be cloned from https://github.com/chrlembeck/vaadin-grid-bug.git
The issue occures in vaadin version 11.0.1 and 10.0.3 running it inside an spring boot application with the embedded tomcat. It can be reproduced in any browser.