From 014f9128a5a0ca1b52289606d6ddd9f4e66bcdcf Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 8 Jan 2021 08:52:55 +0800 Subject: [PATCH] fix: sorting of sub table fields --- packages/plugin-pages/src/actions/getView.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/plugin-pages/src/actions/getView.ts b/packages/plugin-pages/src/actions/getView.ts index db25c8612..75eb0474d 100644 --- a/packages/plugin-pages/src/actions/getView.ts +++ b/packages/plugin-pages/src/actions/getView.ts @@ -141,7 +141,9 @@ const transforms = { } const props = {}; if (field.get('interface') === 'subTable') { - const children = await field.getChildren(); + const children = await field.getChildren({ + order: [['sort', 'asc']], + }); props['children'] = children.map(child => ({...child.toJSON(), dataIndex: child.name.split('.')})) } arr.push({