Dynamically sort RG without using a dropdown

Hello,

I can’t seem to find any solution, All solution found require dropdowns, 1 for “sort by” and 1 for “Ascending / Descending” .

I would like to build a sorting method that combines both, just by adding sorting arrow beside the title. (see image)

Is this thing possible ?
Thank you.

Just use custom states to define the sort field and direction, and set those states accordingly when the arrow buttons are clicked.

Ok I did that, it works fine when I use one element to sort by (for example here “Departement”) however it does not want to sort by with “Description”

This is what I did :

You need to use Dynamic Sorting - not a static sort field.

So change the ‘sort by’ value to ‘Change which field’ and then set the sort by field dynamically.

Oh ok, it works, thank you !

1 Like