diff --git a/packages/main/src/internal/withWebComponent.tsx b/packages/main/src/internal/withWebComponent.tsx index e662c4c93f0..f56b80ba36a 100644 --- a/packages/main/src/internal/withWebComponent.tsx +++ b/packages/main/src/internal/withWebComponent.tsx @@ -70,11 +70,13 @@ export const withWebComponent = ( return Object.entries(rest) .filter(([slotName]) => slotProperties.includes(slotName)) .map(([slotName, slotValue]) => { - return Children.map(slotValue, (item: ReactElement, index) => - cloneElement(item, { - key: `${slotName}-${index}`, - slot: slotName - }) + return Children.map( + slotValue?.type === React.Fragment ? slotValue.props.children : slotValue, + (item: ReactElement, index) => + cloneElement(item, { + key: `${slotName}-${index}`, + slot: slotName + }) ); }); }, diff --git a/packages/main/src/webComponents/Table/Table.stories.tsx b/packages/main/src/webComponents/Table/Table.stories.tsx index 3c71c28ef4a..6d951f987dd 100644 --- a/packages/main/src/webComponents/Table/Table.stories.tsx +++ b/packages/main/src/webComponents/Table/Table.stories.tsx @@ -25,19 +25,15 @@ export const generatedDefaultStory = () => ( - - - -