Browse Source

fix: metaList missing orderBy (#2169)

Signed-off-by: 诗人的咸鱼 <willnewii@163.com>
pull/2183/head
诗人的咸鱼 2 years ago committed by GitHub
parent
commit
e578f44e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nocodb/src/lib/noco/meta/NcMetaIOImpl.ts

5
packages/nocodb/src/lib/noco/meta/NcMetaIOImpl.ts

@ -307,6 +307,11 @@ export default class NcMetaIOImpl extends NcMetaIO {
(query as any).condition(args.xcCondition); (query as any).condition(args.xcCondition);
} }
if (args?.orderBy) {
for (const [col, dir] of Object.entries(args.orderBy)) {
query.orderBy(col, dir);
}
}
if (args?.fields?.length) { if (args?.fields?.length) {
query.select(...args.fields); query.select(...args.fields);
} }

Loading…
Cancel
Save