Skip to content

Commit adfe6b0

Browse files
fix expansion container comps not saved
1 parent abf460b commit adfe6b0

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

client/packages/lowcoder/src/comps/comps/lazyLoadComp/lazyLoadComp.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export function lazyLoadComp(
100100
}
101101

102102
private async load() {
103-
console.log('lazyLoad ->', compName);
104103
if (!compPath) {
105104
return;
106105
}
@@ -115,7 +114,6 @@ export function lazyLoadComp(
115114
log.error("loader not found, lazy load info:", compPath);
116115
return;
117116
}
118-
console.log(LazyExportedComp)
119117

120118
const params: CompParams<any> = {
121119
dispatch: this.dispatch,

client/packages/lowcoder/src/comps/generators/withSelectedMultiContext.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function withSelectedMultiContext<TCtor extends MultiCompConstructor>(
5353
}
5454

5555
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);
5757
let comp = this;
5858
if (isMyCustomAction<SetSelectionAction>(action, "setSelection")) {
5959
const { selection, params } = action.value;
@@ -73,26 +73,33 @@ export function withSelectedMultiContext<TCtor extends MultiCompConstructor>(
7373
);
7474
}
7575
} 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+
) {
8081
if (action.path[0] === MAP_KEY && action.path[1] === SELECTED_KEY) {
8182
action.path[1] = this.selection;
8283
}
8384
comp = super.reduce(action);
8485
} 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) {
8990
// broadcast
9091
const newAction = {
9192
...action,
9293
path: action.path.slice(2),
9394
};
9495
comp = comp.reduce(WithMultiContextComp.forEachAction(newAction));
9596
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);
96103
}
97104

98105
// console.info("exit withSelectedMultiContext reduce. action: ", action, "\nthis:", this, "\ncomp:", comp);

0 commit comments

Comments
 (0)