Skip to content

Commit c287d33

Browse files
committed
refactor: simplify props handling in ContainerRenderer and remove legacy properties wrapper support
1 parent 52e6f27 commit c287d33

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/components/src/renderers/layout/container.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,23 @@ const ContainerRenderer = forwardRef<HTMLDivElement, { schema: ContainerSchema;
5252
className
5353
);
5454

55-
// Extract designer-related properties
55+
// Extract designer-related props
5656
const {
5757
'data-obj-id': dataObjId,
5858
'data-obj-type': dataObjType,
5959
style,
60-
properties, // Handle properties wrapper if it exists (legacy/config fix)
6160
...containerProps
6261
} = props;
6362

64-
// Merge properties if they exist (handling the properties wrapper issue)
65-
const mergedProps = { ...containerProps, ...properties };
66-
6763
return (
6864
<div
6965
ref={ref}
7066
className={containerClass}
71-
{...mergedProps}
67+
{...containerProps}
7268
// Apply designer props
7369
{...{ 'data-obj-id': dataObjId, 'data-obj-type': dataObjType, style }}
7470
>
7571
{schema.children && renderChildren(schema.children)}
76-
{/* Support properties.children which comes from objectstack.config wrapper */}
77-
{properties?.children && renderChildren(properties.children)}
7872
</div>
7973
);
8074
}

0 commit comments

Comments
 (0)