fix: 修复自定义标题标签不显示 (#963)

Reviewed-on: daoyoucloud/tachybase#963
Reviewed-by: sealday <zhanglin@daoyoucloud.com>
Co-authored-by: wjh <wwwjh0710@163.com>
Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
wjh 2024-05-10 11:49:56 +08:00 committed by sealday
parent 3723ad1486
commit 2b8604302b
2 changed files with 3 additions and 4 deletions

View File

@ -353,7 +353,7 @@ export const FilterItemCustomDesigner: React.FC = () => {
{component === 'Select' || component === 'AutoComplete' ? <SchemaSettingCollection /> : null}
{component === 'Select' || component === 'AutoComplete' ? <SchemaSettingComponent /> : null}
{component === 'Select' || component === 'AutoComplete' ? <EditTitleField /> : null}
<EditFormulaTitleField />
{component === 'Select' || component === 'AutoComplete' ? <EditFormulaTitleField /> : null}
<EditDefaultValue />
<SchemaSettingsDivider />
<SchemaSettingsRemove

View File

@ -78,9 +78,8 @@ export const useFormulaTitleVisible = () => {
// FIXME 这里现在只有当设置为 select默认为 select 的时候看不到
return (
options.length > 0 &&
fieldSchema['x-component-props']?.mode === 'Select' &&
fieldSchema['x-component-props']?.fieldNames?.value !== undefined &&
fieldSchema['x-component'] === 'CollectionField'
(fieldSchema['x-component-props']?.mode === 'Select' || fieldSchema['x-component'] === 'CollectionField') &&
fieldSchema['x-component-props']?.fieldNames?.value !== undefined
);
};