Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2024-12-26 13:31:33 +00:00
commit 7e9cda873f

View File

@ -193,9 +193,12 @@ export const TableBlockProvider = withDynamicSchemaProps((props) => {
const collection = getCollection(props.collection, props.dataSource);
const { treeTable } = fieldSchema?.['x-decorator-props'] || {};
const { params, parseVariableLoading } = useTableBlockParamsCompat(props);
let childrenColumnName = 'children';
// Prevent tables with 'children' field from automatically converting to tree-structured tables
let childrenColumnName = '__nochildren__';
if (treeTable) {
childrenColumnName = 'children';
if (resourceName?.includes('.')) {
const f = getCollectionField(resourceName);
if (f?.treeChildren) {
@ -209,6 +212,8 @@ export const TableBlockProvider = withDynamicSchemaProps((props) => {
}
params['tree'] = true;
}
} else {
childrenColumnName = '__nochildren__';
}
const form = useMemo(() => createForm(), [treeTable]);