mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
fd138ab045
@ -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]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user