mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 14:39:25 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
7e9cda873f
@ -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