From 039deac92bfaf86ed94e9c77fc932947441ba531 Mon Sep 17 00:00:00 2001 From: YANG QIA <2013xile@gmail.com> Date: Fri, 24 Nov 2023 15:43:04 +0800 Subject: [PATCH] fix: sql collection creation issue (#3087) --- .../templates/components/sql-collection/FieldsConfigure.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx b/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx index 3fa937d6a5..e4586af595 100644 --- a/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx +++ b/packages/core/client/src/collection-manager/templates/components/sql-collection/FieldsConfigure.tsx @@ -9,9 +9,7 @@ import { useCompile } from '../../../../schema-component'; import { useCollectionManager } from '../../../hooks'; import dayjs from 'dayjs'; import { FieldOptions } from '@nocobase/database'; -import { ResourceActionContext, useResourceContext } from '../../../ResourceActionProvider'; -import { useRecord } from '../../../../record-provider'; -import { last } from 'lodash'; +import { ResourceActionContext } from '../../../ResourceActionProvider'; const inferInterface = (field: string, value: any) => { if (field.toLowerCase().includes('id')) { @@ -24,7 +22,7 @@ const inferInterface = (field: string, value: any) => { return 'number'; } if (typeof value === 'boolean') { - return 'boolean'; + return 'checkbox'; } if (dayjs(value).isValid()) { return 'datetime';