diff --git a/packages/datalib/src/PerspectiveDataLoader.ts b/packages/datalib/src/PerspectiveDataLoader.ts index 538bc24d..bcee5158 100644 --- a/packages/datalib/src/PerspectiveDataLoader.ts +++ b/packages/datalib/src/PerspectiveDataLoader.ts @@ -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, };