diff --git a/packages/core/client/src/block-provider/KanbanBlockProvider.tsx b/packages/core/client/src/block-provider/KanbanBlockProvider.tsx index 568e7bd5c..17947fd52 100644 --- a/packages/core/client/src/block-provider/KanbanBlockProvider.tsx +++ b/packages/core/client/src/block-provider/KanbanBlockProvider.tsx @@ -83,14 +83,17 @@ const useAssociationNames = (collection) => { } const fieldSchema = useFieldSchema(); const kanbanSchema = fieldSchema.reduceProperties((buf, schema) => { - if (schema['x-component'] === 'KanbanV2') { + if (schema['x-component'].startsWith('Kanban')) { return schema; } return buf; }, new Schema({})); const gridSchema: any = kanbanSchema?.properties?.card?.properties?.grid; const appends = []; - recursiveProperties(gridSchema, 'CollectionField', associationFields, appends); + if (gridSchema) { + recursiveProperties(gridSchema, 'CollectionField', associationFields, appends); + } + return uniq(appends); }; diff --git a/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.Designer.tsx b/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.Designer.tsx index 5a0b0fb74..714aa38ad 100644 --- a/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.Designer.tsx @@ -99,7 +99,7 @@ export const KanbanCardDesigner = (props: any) => { { type: 'itemGroup', title: t('Display association fields'), - children: useAssociatedFormItemInitializerFields({readPretty: true, block: 'KanbanV2'}), + children: useAssociatedFormItemInitializerFields({readPretty: true, block: 'Kanban'}), }, ]} component={}