mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1915: fix(remission-list-resource): only apply default sorting when no orderBy spec...
fix(remission-list-resource): only apply default sorting when no orderBy specified Replace default sort mechanism to respect explicit orderBy from QueryToken. Previously, the resource always applied manual sorting regardless of whether explicit ordering was requested, causing conflicts with user-defined sorting. Now checks if queryToken.orderBy exists and has items before applying the default sort behavior (manually-added items first, then by created date). Refs: #5276
This commit is contained in:
committed by
Andreas Schickinger
parent
2af16d92ea
commit
e4f289c67d
@@ -126,7 +126,10 @@ export const createRemissionListResource = (
|
||||
throw new ResponseArgsError(res);
|
||||
}
|
||||
|
||||
if (res && res.result && Array.isArray(res.result)) {
|
||||
// #5276 Fix - Replace defaultSort Mechanism with orderBy from QueryToken if available
|
||||
const hasOrderBy = !!queryToken?.orderBy && queryToken.orderBy.length > 0;
|
||||
|
||||
if (!hasOrderBy && res && res.result && Array.isArray(res.result)) {
|
||||
sortResponseResult(res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user