@@ -53,7 +53,7 @@ export function withSelectedMultiContext<TCtor extends MultiCompConstructor>(
53
53
}
54
54
55
55
override reduce ( action : CompAction ) : this {
56
- console . info ( "enter withSelectedMultiContext reduce. action: " , action , "\nthis: " , this ) ;
56
+ // console.info("enter withSelectedMultiContext reduce. action: ", action, "\nthis: ", this);
57
57
let comp = this ;
58
58
if ( isMyCustomAction < SetSelectionAction > ( action , "setSelection" ) ) {
59
59
const { selection, params } = action . value ;
@@ -73,26 +73,33 @@ export function withSelectedMultiContext<TCtor extends MultiCompConstructor>(
73
73
) ;
74
74
}
75
75
} else if ( (
76
- ! action . editDSL
77
- && ! isCustomAction < LazyCompReadyAction > ( action , "LazyCompReady" )
78
- && ! isCustomAction < ModuleReadyAction > ( action , "moduleReady" )
79
- ) || action . path [ 0 ] !== MAP_KEY || _ . isNil ( action . path [ 1 ] ) ) {
76
+ ! action . editDSL
77
+ && ! isCustomAction < LazyCompReadyAction > ( action , "LazyCompReady" )
78
+ && ! isCustomAction < ModuleReadyAction > ( action , "moduleReady" )
79
+ ) || action . path [ 0 ] !== MAP_KEY || _ . isNil ( action . path [ 1 ] )
80
+ ) {
80
81
if ( action . path [ 0 ] === MAP_KEY && action . path [ 1 ] === SELECTED_KEY ) {
81
82
action . path [ 1 ] = this . selection ;
82
83
}
83
84
comp = super . reduce ( action ) ;
84
85
} else if ( (
85
- action . editDSL
86
- || isCustomAction < LazyCompReadyAction > ( action , "LazyCompReady" )
87
- || isCustomAction < ModuleReadyAction > ( action , "moduleReady" )
88
- ) && action . path [ 1 ] === SELECTED_KEY ) {
86
+ action . editDSL
87
+ || isCustomAction < LazyCompReadyAction > ( action , "LazyCompReady" )
88
+ || isCustomAction < ModuleReadyAction > ( action , "moduleReady" )
89
+ ) && action . path [ 1 ] === SELECTED_KEY ) {
89
90
// broadcast
90
91
const newAction = {
91
92
...action ,
92
93
path : action . path . slice ( 2 ) ,
93
94
} ;
94
95
comp = comp . reduce ( WithMultiContextComp . forEachAction ( newAction ) ) ;
95
96
comp = comp . reduce ( wrapChildAction ( COMP_KEY , newAction ) ) ;
97
+ } else if (
98
+ ! action . editDSL
99
+ && isCustomAction < ModuleReadyAction > ( action , "moduleReady" )
100
+ && action . path [ 0 ] === MAP_KEY
101
+ ) {
102
+ comp = super . reduce ( action ) ;
96
103
}
97
104
98
105
// console.info("exit withSelectedMultiContext reduce. action: ", action, "\nthis:", this, "\ncomp:", comp);
0 commit comments