fix: display title enable (#1995)

This commit is contained in:
katherinehhh 2023-06-07 00:18:44 +08:00 committed by GitHub
parent a8191ed26f
commit ac070de216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ export const GeneralSchemaItems: React.FC<{
/>
)}
<SchemaSettings.SwitchItem
checked={fieldSchema['x-decorator-props'] ?? true}
checked={field.decoratorProps.showTitle ?? true}
title={t('Display title')}
onChange={(checked) => {
fieldSchema['x-decorator-props'] = fieldSchema['x-decorator-props'] || {};