@@ -110,7 +110,56 @@ export class AppTree {
110110
111111 this . root ! . children = this . #layout_payload. children . map ( ( node ) =>
112112 this . traverse ( node , ( node ) => {
113- const new_node = this . create_node ( node , component_map ) ;
113+ const new_node = this . create_node (
114+ node ,
115+ component_map ,
116+ false ,
117+ this . reactive_formatter
118+ ) ;
119+ return new_node ;
120+ } )
121+ ) ;
122+ this . component_ids = components . map ( ( c ) => c . id ) ;
123+ this . initial_tabs = { } ;
124+ gather_initial_tabs ( this . root ! , this . initial_tabs ) ;
125+ this . postprocess ( this . root ! ) ;
126+ }
127+
128+ reload (
129+ components : ComponentMeta [ ] ,
130+ layout : LayoutNode ,
131+ dependencies : Dependency [ ] ,
132+ config : AppConfig
133+ ) {
134+ this . #layout_payload = layout ;
135+ this . #component_payload = components ;
136+ this . #config = config ;
137+ this . #dependency_payload = dependencies ;
138+
139+ this . root = this . create_node (
140+ { id : layout . id , children : [ ] } ,
141+ new Map ( ) ,
142+ true
143+ ) ;
144+ for ( const comp of components ) {
145+ if ( comp . props . visible != false ) this . components_to_register . add ( comp . id ) ;
146+ }
147+
148+ this . prepare ( ) ;
149+
150+ const component_map = components . reduce ( ( map , comp ) => {
151+ map . set ( comp . id , comp ) ;
152+ return map ;
153+ } , new Map < number , ComponentMeta > ( ) ) ;
154+
155+ this . root ! . children = this . #layout_payload. children . map ( ( node ) =>
156+ this . traverse ( node , ( node ) => {
157+ const new_node = this . create_node (
158+ node ,
159+ component_map ,
160+ false ,
161+ this . reactive_formatter
162+ ) ;
114163 return new_node ;
115164 } )
116165 ) ;
@@ -426,10 +475,6 @@ function gather_props(
426475 // For Tabs (or any component that already has an id prop)
427476 // Set the id to the props so that it doesn't get overwritten
428477 if ( key === "id" || key === "autoscroll" ) {
429- console . log ( "gather_props setting id/autoscroll" , {
430- key,
431- value : props [ key ]
432- } ) ;
433478 _props [ key ] = props [ key ] ;
434479 } else if ( allowed_shared_props . includes ( key as keyof SharedProps ) ) {
435480 const _key = key as keyof SharedProps ;
0 commit comments