diff --git a/packages/core/client/src/schema-component/antd/association-field/SubTabs/InternalCollapse.tsx b/packages/core/client/src/schema-component/antd/association-field/SubTabs/InternalCollapse.tsx index 338d34f6a..a085e577a 100644 --- a/packages/core/client/src/schema-component/antd/association-field/SubTabs/InternalCollapse.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/SubTabs/InternalCollapse.tsx @@ -207,24 +207,28 @@ export const InternalTabs = observer((props) => { {options.length ? ( ({ - ...item, - children: ( - - {item?.childrenItems?.map((childrenitem, index) => ( - - ))} - - ), - }))} + items={options + .sort((a, b) => (a.sort != null ? a.sort - b.sort : a.id - b.id)) + .map((item) => ({ + ...item, + children: ( + + {item?.childrenItems + ?.sort((a, b) => (a.sort != null ? a.sort - b.sort : a.id - b.id)) + .map((childrenitem, index) => ( + + ))} + + ), + }))} style={{ maxHeight: '30vh', padding: '10px' }} defaultActiveKey="all" >