tiptap: fix react key

pull/65/head
fantasticit 2022-06-04 23:03:41 +08:00
parent 1ccad83686
commit bfddd4cc6e
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ export const Insert: React.FC<{ editor: Editor }> = ({ editor }) => {
) : command.custom ? ( ) : command.custom ? (
command.custom(editor, runCommand) command.custom(editor, runCommand)
) : ( ) : (
<Dropdown.Item key={command.label} onClick={runCommand(command)}> <Dropdown.Item key={index + '-' + command.label} onClick={runCommand(command)}>
{command.icon} {command.icon}
{command.label} {command.label}
</Dropdown.Item> </Dropdown.Item>