From 3b2603b687af69284a71d6f6658da991573d2b1f Mon Sep 17 00:00:00 2001 From: Nikolay Tverdokhlebov Date: Thu, 2 Mar 2023 12:44:35 +0300 Subject: [PATCH] fix: add uniqueness to children key prop --- .../components/ConstructorBlocks/ConstructorBlocks.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.tsx b/src/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.tsx index 426d8d566..2b04e969f 100644 --- a/src/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.tsx +++ b/src/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.tsx @@ -30,7 +30,7 @@ export const ConstructorBlocks = ({items, shouldRenderBlock}: ConstructorBlocksP let itemElement; const key = getBlockKey(item, index); const blockId = parentId ? `${parentId}_${key}` : key; - if (shouldRenderBlock && !shouldRenderBlock(item, key)) { + if (shouldRenderBlock && !shouldRenderBlock(item, blockId)) { return null; } @@ -44,8 +44,8 @@ export const ConstructorBlocks = ({items, shouldRenderBlock}: ConstructorBlocksP itemElement = ( - + {children}