From e578f44e480daaaed911355bca67dda3a9aab953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AF=97=E4=BA=BA=E7=9A=84=E5=92=B8=E9=B1=BC?= Date: Fri, 27 May 2022 23:50:22 +0800 Subject: [PATCH] fix: metaList missing orderBy (#2169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 诗人的咸鱼 --- packages/nocodb/src/lib/noco/meta/NcMetaIOImpl.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nocodb/src/lib/noco/meta/NcMetaIOImpl.ts b/packages/nocodb/src/lib/noco/meta/NcMetaIOImpl.ts index ef7be286fe..f2dcb929ec 100644 --- a/packages/nocodb/src/lib/noco/meta/NcMetaIOImpl.ts +++ b/packages/nocodb/src/lib/noco/meta/NcMetaIOImpl.ts @@ -307,6 +307,11 @@ export default class NcMetaIOImpl extends NcMetaIO { (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) { query.select(...args.fields); }