Skip to content

Commit c1b4eb4

Browse files
authored
Merge pull request #572 from components-ai/maintain-component-children
Maintain component children
2 parents 551d275 + 565f3ed commit c1b4eb4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/gold-parents-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@compai/css-gui': patch
3+
---
4+
5+
Maintain component children

packages/gui/src/components/html/Component/Editor.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ export const ComponentEditor = ({ value, onChange }: ComponentEditorProps) => {
3636
const component = components.find((c) => c.id === selectedItem)
3737

3838
if (component) {
39-
onChange({ ...component, props: value.props })
39+
onChange({
40+
...component,
41+
props: value.props,
42+
children: value.children,
43+
})
4044
}
4145
}
4246

0 commit comments

Comments
 (0)