Skip to content

Commit 3fd4d30

Browse files
remove isModule check on page load query trigger
1 parent b9f936d commit 3fd4d30

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

client/packages/lowcoder/src/comps/queries/queryComp.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import DataSourceIcon from "components/DataSourceIcon";
88
import { SimpleNameComp } from "comps/comps/simpleNameComp";
99
import { StringControl } from "comps/controls/codeControl";
1010
import { eventHandlerControl } from "comps/controls/eventHandlerControl";
11-
import { EditorContext, EditorState } from "comps/editorState";
11+
import { EditorState } from "comps/editorState";
1212
import {
1313
stateComp,
1414
valueComp,
@@ -43,7 +43,7 @@ import {
4343
wrapActionExtraInfo,
4444
} from "lowcoder-core";
4545
import { ValueFromOption } from "lowcoder-design";
46-
import { ReactNode, useContext, useEffect } from "react";
46+
import { ReactNode, useEffect } from "react";
4747
import {
4848
BottomResComp,
4949
BottomResCompResult,
@@ -271,18 +271,11 @@ interface QueryViewProps {
271271
}
272272

273273
function QueryView(props: QueryViewProps) {
274-
const editorState = useContext(EditorContext);
275274
const { comp } = props;
276275

277276
useEffect(() => {
278277
// Automatically load when page load
279-
const depList = Object.keys(comp.children.comp.node()?.dependValues() ?? {});
280-
const depName = depList.length ? depList[0] : null;
281-
const depComp = depName ? editorState.getUICompByName(depName) : undefined;
282-
const isModule = depComp ? depComp.children.compType.getView() === 'module' : false;
283-
284278
if (
285-
isModule &&
286279
getTriggerType(comp) === "automatic" &&
287280
(comp as any).isDepReady &&
288281
!comp.children.isNewCreate.value

0 commit comments

Comments
 (0)