Column multi sorting

Hello everyone,

I’m using Vaadin 14 and I’m trying to implement multiple column sorting on a grid.

When I click on one column and then on another, I expect the first clicked column to retain priority over the second one, but this is not happening. Essentially, the last clicked column becomes the first one in terms of sorting priority.

How can I resolve this issue?

AFAIK this is not availble in Vaadin 14

In newer versions you can use:

grid.setMultiSort(true, MultiSortPriority.APPEND);

If I wanted to perform an upgrade, considering that I also have many external libraries, how should I proceed to avoid risking project invalidation?

@capable-jay What do you mean by “project invalidation”?

You can go through your addons and see if there are new versions in https://vaadin.com/directory/. E.g., find the latest version of Vaadin supported by all of your addons. Unless you wrote tests, you’ll have to poke around to make sure everything works after upgrading.

I mean that the project cannot work or compile anymore

Try doing the above in a new branch and first checking if it builds

Well fixing it is probably the most straight forwarded strategy - and things are going to break.

Especially if you upgrade to Vaadin 24

Going to 23 isn’t really an option :sweat_smile: as temporary solution yes… but most people are using Vaadin with SB where 2.x is going to be EoL this year :kissing:

Very very good point

Is there no backward compatibility with the components that work on version 14?

https://vaadin.com/docs/v23/upgrading/essential-steps there is a migration guide to look at. Depending on your Framework usage it can be quite easy or a bit more work.