fix(blocks-antd): Fix menu keys.

This commit is contained in:
Gervwyk 2022-04-26 13:23:55 +02:00
parent 655eae5c57
commit c6b8c69bb0

View File

@ -124,7 +124,7 @@ const MenuComp = ({
case 'MenuGroup':
return (
<Menu.SubMenu
key={link.pageId || link.id || i}
key={`${link.pageId || link.id}_${i}`}
title={
<Link
id={link.pageId || link.id || i}
@ -158,7 +158,7 @@ const MenuComp = ({
case 'MenuGroup':
return (
<Menu.ItemGroup
key={subLink.pageId || subLink.id || j}
key={`${subLink.pageId || subLink.id}_${j}`}
title={
<Link
id={subLink.pageId || subLink.id || j}
@ -181,7 +181,7 @@ const MenuComp = ({
}
return (
<Menu.Item
key={subLinkGroup.pageId || subLinkGroup.id || k}
key={`${subLinkGroup.pageId || subLinkGroup.id}_${k}`}
danger={get(subLinkGroup, 'properties.danger')}
icon={
subLinkGroup.properties &&
@ -210,7 +210,7 @@ const MenuComp = ({
default:
return (
<Menu.Item
key={subLink.pageId || subLink.id || j}
key={`${subLink.pageId || subLink.id}_${j}`}
danger={get(subLink, 'properties.danger')}
icon={
subLink.properties &&
@ -240,7 +240,7 @@ const MenuComp = ({
default:
return (
<Menu.Item
key={link.pageId || link.id || i}
key={`${link.pageId || link.id}_${i}`}
danger={get(link, 'properties.danger')}
icon={
link.properties &&