File tree 1 file changed +7
-5
lines changed
client/packages/lowcoder/src/comps/comps/moduleComp
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,11 @@ class ModuleTmpComp extends ModuleCompBase {
221
221
222
222
override changeDispatch ( dispatch : DispatchType ) {
223
223
const next = super . changeDispatch ( dispatch ) ;
224
- const nextModuleRootComp = this . moduleRootComp ?. changeDispatch ( next . getModuleDispatchFn ( ) ) ;
224
+ const nextModuleRootComp = this . moduleRootComp ?. changeDispatch (
225
+ this . getModuleDispatchFn ( next . dispatch )
226
+ ) ;
225
227
if ( ! nextModuleRootComp ) {
226
- return next ;
228
+ return this ;
227
229
}
228
230
return setFieldsNoTypeCheck (
229
231
next ,
@@ -234,10 +236,10 @@ class ModuleTmpComp extends ModuleCompBase {
234
236
) ;
235
237
}
236
238
237
- getModuleDispatchFn ( ) {
239
+ getModuleDispatchFn ( dispatch : DispatchType ) {
238
240
return ( action : CompAction < any > ) => {
239
241
// log.info("dispatch from module:", action);
240
- this . dispatch (
242
+ dispatch (
241
243
customAction (
242
244
{
243
245
type : "delegated" ,
@@ -305,7 +307,7 @@ class ModuleTmpComp extends ModuleCompBase {
305
307
if ( getReduceContext ( ) . disableUpdateState ) return this ;
306
308
const { dsl, moduleDsl } = action . value ;
307
309
const moduleRootComp = new RootComp ( {
308
- dispatch : this . getModuleDispatchFn ( ) ,
310
+ dispatch : this . getModuleDispatchFn ( this . dispatch ) ,
309
311
value : dsl ,
310
312
} ) ;
311
313
moduleRootComp . setModuleRoot ( true ) ;
You can’t perform that action at this time.
0 commit comments