From cbfd057c6d6fc9eac69c08cab2ba96bc22afcaaa Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 31 Dec 2022 14:58:59 +0800 Subject: [PATCH] fix: missing collections --- packages/core/client/src/schema-initializer/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index d42b10d8c1..54739dea0a 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -223,7 +223,7 @@ export const useFormItemInitializerFields = (options?: any) => { } as SchemaInitializerItemOptions; if (block == 'Kanban') { resultItem['find'] = (schema: Schema, key: string, action: string) => { - const s = findSchema(schema,'x-component',block) + const s = findSchema(schema, 'x-component', block); return findSchema(s, key, action); }; } @@ -532,7 +532,7 @@ export const useCollectionDataSourceItems = (componentName) => { const b = !value || selected.includes(item.name); if (item.inherit) { return false; - } else if (!item.fields.find((v) => v.primaryKey)) { + } else if (item.autoGenId === false && !item.fields.find((v) => v.primaryKey)) { return false; } else { return b && !(item?.isThrough && item?.autoCreate); @@ -995,7 +995,7 @@ export const createCalendarBlockSchema = (options) => { type: 'void', 'x-component': 'Grid', 'x-initializer-props': { - actionInitializers: 'CalendarFormActionInitializers' + actionInitializers: 'CalendarFormActionInitializers', }, 'x-initializer': 'RecordBlockInitializers', properties: {},