fixed ordering

This commit is contained in:
Jan Prochazka 2024-08-20 14:24:15 +02:00
parent 781d6f1585
commit 9f553ef52a

View File

@ -238,7 +238,13 @@ export class PerspectiveDataLoader {
const res: any = {
pureName,
condition: this.buildSqlCondition(props),
sort: useSort ? props.orderBy : undefined,
sort:
useSort && props.orderBy?.length > 0
? props.orderBy.map(x => ({
...x,
direction: x.order,
}))
: undefined,
skip: props.range?.offset,
limit: props.range?.limit,
};