Hi everyone!
I’m trying to sort items via the API using multiple columns in a single table (e.g., sort by priority
ascending, then due_date
descending). According to the docs, this should work by passing multiple fields to the sort[]
array in the query, like:
?sort[]=priority&sort[]=-due_date
However, no matter what I try:
- The API seems to override my sort order with whatever manual sorting is defined in the Data Model (e.g., drag-and-drop sorting).
- Only the first field in
sort[]
is respected, ignoring subsequent fields.
Questions:
- Has anyone successfully implemented multi-column sorting via the API?
- Is there a conflict with manual sorting in the Data Model that forces override behavior?
- Are there workarounds (e.g., extensions, raw SQL) to achieve this reliably?
Repro Steps:
- Set up a collection with manual sorting enabled.
- Try querying with multiple
sort[]
params. - Observe results ignore the query sort.
Thanks for any insights!