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

View File

@ -269,7 +269,7 @@ export const Menu: ComposedMenu = observer((props) => {
selectedKeys={defaultSelectedKeys} selectedKeys={defaultSelectedKeys}
> >
{designable && ( {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' } })} {render({ style: { background: 'none' } })}
</AntdMenu.Item> </AntdMenu.Item>
)} )}

View File

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