File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
client/packages/lowcoder/src/comps/comps/moduleComp Expand file tree Collapse file tree 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 {
221221
222222 override changeDispatch ( dispatch : DispatchType ) {
223223 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+ ) ;
225227 if ( ! nextModuleRootComp ) {
226- return next ;
228+ return this ;
227229 }
228230 return setFieldsNoTypeCheck (
229231 next ,
@@ -234,10 +236,10 @@ class ModuleTmpComp extends ModuleCompBase {
234236 ) ;
235237 }
236238
237- getModuleDispatchFn ( ) {
239+ getModuleDispatchFn ( dispatch : DispatchType ) {
238240 return ( action : CompAction < any > ) => {
239241 // log.info("dispatch from module:", action);
240- this . dispatch (
242+ dispatch (
241243 customAction (
242244 {
243245 type : "delegated" ,
@@ -305,7 +307,7 @@ class ModuleTmpComp extends ModuleCompBase {
305307 if ( getReduceContext ( ) . disableUpdateState ) return this ;
306308 const { dsl, moduleDsl } = action . value ;
307309 const moduleRootComp = new RootComp ( {
308- dispatch : this . getModuleDispatchFn ( ) ,
310+ dispatch : this . getModuleDispatchFn ( this . dispatch ) ,
309311 value : dsl ,
310312 } ) ;
311313 moduleRootComp . setModuleRoot ( true ) ;
You can’t perform that action at this time.
0 commit comments