Any way to reverse order of calc element filter ?

lcollong

FabriKant d'applications web
Hi,

I have a calc element extracting "Year" from a date element. And a filter on this element to be able to show only the rows of the selected year. Everything's fine except that the filter is showing first "old years" (2006, 2007, 2008, etc...) where most of users are looking for recent ones (2020, 2019, etc...).

Is there any easy way to reverse the order the way the filter is built ? I've take a look on the jlayout but the <option> of the <select> are already in a string. Not easy to manipulate and reverse it.

Any suggestion ?

Thanks,
 
It seems to be deep in the filter built.
I would go with the layout file and string handling, something like
explode('</option>',$filter->element);
and then rsort() all between first and last.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top