fix(client): menu key warnings (#1114)

This commit is contained in:
Junyi 2022-11-21 00:48:09 -08:00 committed by GitHub
parent c888d793ee
commit 9b1ecb67f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -257,6 +257,7 @@ export const MenuDesigner = () => {
<GeneralSchemaDesigner>
<SchemaSettings.ModalItem
title={t('Edit')}
eventKey="edit"
schema={schema as ISchema}
initialValues={initialValues}
onSubmit={({ title, icon, href }) => {
@ -282,6 +283,7 @@ export const MenuDesigner = () => {
/>
<SchemaSettings.ModalItem
title={t('Move to')}
eventKey="move-to"
components={{ TreeSelect }}
effects={effects}
schema={

View File

@ -269,7 +269,7 @@ export const Menu: ComposedMenu = observer((props) => {
selectedKeys={defaultSelectedKeys}
>
{designable && (
<AntdMenu.Item disabled style={{ padding: '0 8px', order: 9999 }}>
<AntdMenu.Item disabled key="x-designer-button" style={{ padding: '0 8px', order: 9999 }}>
{render({ style: { background: 'none' } })}
</AntdMenu.Item>
)}

View File

@ -385,6 +385,7 @@ SchemaSettings.Remove = (props: any) => {
const form = useForm();
return (
<SchemaSettings.Item
eventKey="remove"
onClick={() => {
Modal.confirm({
title: t('Delete block'),