@@ -8,7 +8,7 @@ import DataSourceIcon from "components/DataSourceIcon";
8
8
import { SimpleNameComp } from "comps/comps/simpleNameComp" ;
9
9
import { StringControl } from "comps/controls/codeControl" ;
10
10
import { eventHandlerControl } from "comps/controls/eventHandlerControl" ;
11
- import { EditorContext , EditorState } from "comps/editorState" ;
11
+ import { EditorState } from "comps/editorState" ;
12
12
import {
13
13
stateComp ,
14
14
valueComp ,
@@ -43,7 +43,7 @@ import {
43
43
wrapActionExtraInfo ,
44
44
} from "lowcoder-core" ;
45
45
import { ValueFromOption } from "lowcoder-design" ;
46
- import { ReactNode , useContext , useEffect } from "react" ;
46
+ import { ReactNode , useEffect } from "react" ;
47
47
import {
48
48
BottomResComp ,
49
49
BottomResCompResult ,
@@ -271,18 +271,11 @@ interface QueryViewProps {
271
271
}
272
272
273
273
function QueryView ( props : QueryViewProps ) {
274
- const editorState = useContext ( EditorContext ) ;
275
274
const { comp } = props ;
276
275
277
276
useEffect ( ( ) => {
278
277
// 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
-
284
278
if (
285
- isModule &&
286
279
getTriggerType ( comp ) === "automatic" &&
287
280
( comp as any ) . isDepReady &&
288
281
! comp . children . isNewCreate . value
0 commit comments