sift
sift copied to clipboard
Sort Not Respecting Param Order
The sorts are not respecting the order passed by the client when chaining multiple sorts. It appears that sort order is determined by the order in which sort_on is declared in the filterable class.
For example, passing the following sort params both result in the same query:
sort=title,submittal_package
sort=submittal_package,title
ORDER BY LOWER(submittal_logs.title) ASC NULLS FIRST,
natural_sort(packages_for_sort.number) COLLATE en_US ASC,
natural_sort(packages_for_sort.title) COLLATE en_US ASC NULLS FIRST