vaadin / vaadin-grid-flow

Vaadin Flow Java API for vaadin/vaadin-grid Web Component
https://vaadin.com/components/vaadin-grid
Other
14 stars 16 forks source link

Can't set a column sort order in Vaadin10+, but the classes to build/manage it are still present #462

Closed AB-xdev closed 5 years ago

AB-xdev commented 5 years ago

Vaadin 8 contains a method to set the column sort order in Grid: setSortOrder

However this method is missing in Vaadin10+, but the classes to manage sort orders still exist: GridSortOrder GridSortOrderBuilder

denis-anisimov commented 5 years ago

There is Grid:sort method. I think it should does what you want. At least it delegates to the private setSortOrder method.

Please reopen if it doesn't work for you.

Legioth commented 5 years ago

Could be mentioned that Grid::sort was introduced with Vaadin 12, but is not available for Vaadin 10 or Vaadin 11.