@@ -97,16 +97,21 @@ interface AfterExecuteQueryAction {
9797 result : QueryResult ;
9898}
9999
100+ const CommonTriggerOptions = [
101+ { label : trans ( "query.triggerTypeInputChange" ) , value : "onInputChange" } ,
102+ { label : trans ( "query.triggerTypeQueryExec" ) , value : "onQueryExecution" } ,
103+ { label : trans ( "query.triggerTypeTimeout" ) , value : "onTimeout" } ,
104+ ]
105+
100106export const TriggerTypeOptions = [
101- { label : "On Page Load" , value : "onPageLoad" } ,
102- { label : "On Input Change" , value : "onInputChange" } ,
103- { label : "On Query Execution" , value : "onQueryExecution" } ,
104- { label : "On Timeout" , value : "onTimeout" } ,
107+ { label : trans ( "query.triggerTypePageLoad" ) , value : "onPageLoad" } ,
108+ ...CommonTriggerOptions ,
105109 { label : trans ( "query.triggerTypeAuto" ) , value : "automatic" } ,
106110 { label : trans ( "query.triggerTypeManual" ) , value : "manual" } ,
107111] as const ;
108112
109113export const JSTriggerTypeOptions = [
114+ ...CommonTriggerOptions ,
110115 { label : trans ( "query.triggerTypePageLoad" ) , value : "automatic" } ,
111116 { label : trans ( "query.triggerTypeManual" ) , value : "manual" } ,
112117] ;
@@ -244,13 +249,13 @@ QueryCompTmp = class extends QueryCompTmp {
244249 const isInputChangeTrigger = getTriggerType ( this ) === "onInputChange" ;
245250
246251 if (
247- action . type === CompActionTypes . UPDATE_NODES_V2 &&
248- (
252+ action . type === CompActionTypes . UPDATE_NODES_V2
253+ && (
249254 isAutomatic
250255 || isInputChangeTrigger
251256 || ( isPageLoadTrigger && notExecuted )
252- ) &&
253- ( ! isJsQuery || ( isJsQuery && notExecuted ) ) // query which has deps can be executed on page load(first time)
257+ )
258+ // && (!isJsQuery || (isJsQuery && notExecuted)) // query which has deps can be executed on page load(first time)
254259 ) {
255260 const next = super . reduce ( action ) ;
256261 const depends = this . children . comp . node ( ) ?. dependValues ( ) ;
0 commit comments