jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
487 stars 112 forks source link

Support in-memory sorting for DataGrid #3389

Open glebfox opened 2 weeks ago

glebfox commented 2 weeks ago

Origin: forum

Problem

If more than one page of data is loaded, in-memory sorting for transient attributes is not applied. This may confuse users because behavior differs for one page and several.

Proposed solution

  1. Make columns now associated with jpa attributes non-sortable by default.
  2. Provide explicit in-memory sorting rule, e.g. using Vaadin Grid API - https://vaadin.com/docs/next/components/grid#specifying-sort-property (Column:: setComparator)
  3. CollectionLoader should take into account this in-memory sorter