File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
packages/app-frontend/src/features/components Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -261,18 +261,19 @@ export function setupComponentsBridgeEvents (bridge) {
261
261
262
262
// Handle tree data
263
263
const data = parse ( treeData )
264
+ console . log ( 'component tree:' , data , instanceId )
264
265
const instance = componentsMap [ instanceId ]
265
266
if ( instance ) {
266
- for ( const key in data ) {
267
- Vue . set ( instance , key , data [ key ] )
267
+ for ( const item of data ) {
268
+ const component = componentsMap [ item . id ]
269
+ for ( const key in item ) {
270
+ Vue . set ( component , key , item [ key ] )
271
+ }
272
+ addToComponentsMap ( component )
268
273
}
269
- addToComponentsMap ( instance )
270
274
} else if ( Array . isArray ( data ) ) {
271
275
rootInstances . value = data
272
276
data . forEach ( i => addToComponentsMap ( i ) )
273
- } else {
274
- rootInstances . value = [ data ]
275
- addToComponentsMap ( data )
276
277
}
277
278
278
279
// Try to load selected component again
You can’t perform that action at this time.
0 commit comments