Closed chrlembeck closed 6 years ago
Issue moved to vaadin/vaadin-grid-flow #353 via ZenHub
Thanks for the issue report - but please next time, start off by mentioning the framework version you are using. Since you have the issue with Vaadin 10 / 11, I've moved the issue to the correct repository.
I know this is a lot to grasp, but vaadin/framework repository is for Vaadin version 8 (or older), and since Vaadin 10 the issue should go to either vaadin/flow (for Java framework issues) or component specific issues to the component repositories (eg. vaadin/vaadin-grid-flow).
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.