Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/packages/lowcoder/src/comps/comps/rootComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const RootView = React.memo((props: RootViewProps) => {
return (oldState ? changeEditorStateFn(oldState) : undefined)
});
}
});
}, undefined, isModuleRoot);
editorStateRef.current = newEditorState;
setEditorState(newEditorState);

Expand All @@ -109,7 +109,7 @@ const RootView = React.memo((props: RootViewProps) => {
editorStateRef.current = undefined;
}
};
}, []);
}, [isModuleRoot]);

useEffect(() => {
if (!mountedRef.current || !editorState) return;
Expand Down
6 changes: 5 additions & 1 deletion client/packages/lowcoder/src/comps/editorState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@ export class EditorState {
rootComp: RootComp,
setEditorState: (fn: (editorState: EditorState) => EditorState) => void,
initialEditorModeStatus: string = getEditorModeStatus(),
isModuleRoot: boolean = false,
) {
this.rootComp = rootComp;
this.setEditorState = setEditorState;
this.editorModeStatus = initialEditorModeStatus;

// save collision status from app dsl to localstorage
saveCollisionStatus(this.getCollisionStatus());
// but only for apps, not for modules (to prevent modules from overwriting the app's setting)
if (!isModuleRoot) {
saveCollisionStatus(this.getCollisionStatus());
}
}

/**
Expand Down
Loading