Skip to content

Commit 153580c

Browse files
fixed remote comps loading issue
1 parent c146fd0 commit 153580c

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

client/packages/lowcoder/src/comps/comps/containerComp/containerView.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,18 @@ const onDrop = async (
222222
const nameGenerator = editorState.getNameGenerator();
223223
const compInfo = parseCompType(compType);
224224
const compName = nameGenerator.genItemName(compInfo.compName);
225-
const {
226-
defaultDataFnName,
227-
defaultDataFnPath,
228-
} = uiCompRegistry[compType as UICompType];
229-
230225
let defaultDataFn = undefined;
231-
if(defaultDataFnName && defaultDataFnPath) {
232-
const module = await import(`../../${defaultDataFnPath}.tsx`);
233-
defaultDataFn = module[defaultDataFnName];
226+
227+
if (!compInfo.isRemote) {
228+
const {
229+
defaultDataFnName,
230+
defaultDataFnPath,
231+
} = uiCompRegistry[compType as UICompType];
232+
233+
if(defaultDataFnName && defaultDataFnPath) {
234+
const module = await import(`../../${defaultDataFnPath}.tsx`);
235+
defaultDataFn = module[defaultDataFnName];
236+
}
234237
}
235238

236239
const widgetValue: GridItemDataType = {

0 commit comments

Comments
 (0)