From c26edf6282ab20839637935700aa2038c85360fa Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Fri, 5 Jan 2024 09:57:23 +0800 Subject: [PATCH] fix: view collection should omit rawTitle when sync form database (#3326) --- .../collection-manager/templates/components/PreviewFields.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx index 3c439ec82..74531e916 100644 --- a/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx +++ b/packages/core/client/src/collection-manager/templates/components/PreviewFields.tsx @@ -1,6 +1,6 @@ import { useField, useForm } from '@formily/react'; import { Cascader, Input, Select, Spin, Table, Tag } from 'antd'; -import { last } from 'lodash'; +import { last, omit } from 'lodash'; import React, { useContext, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { ResourceActionContext, useCompile } from '../../../'; @@ -207,7 +207,7 @@ const PreviewCom = (props) => { defaultValue={item?.uiSchema?.title || text} onChange={(e) => handleFieldChange( - { ...item, uiSchema: { ...item?.uiSchema, title: e.target.value, rawTitle: e.target.value } }, + { ...item, uiSchema: { ...omit(item?.uiSchema, 'rawTitle'), title: e.target.value } }, index, ) }