@@ -97,16 +97,21 @@ interface AfterExecuteQueryAction {
97
97
result : QueryResult ;
98
98
}
99
99
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
+
100
106
export 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 ,
105
109
{ label : trans ( "query.triggerTypeAuto" ) , value : "automatic" } ,
106
110
{ label : trans ( "query.triggerTypeManual" ) , value : "manual" } ,
107
111
] as const ;
108
112
109
113
export const JSTriggerTypeOptions = [
114
+ ...CommonTriggerOptions ,
110
115
{ label : trans ( "query.triggerTypePageLoad" ) , value : "automatic" } ,
111
116
{ label : trans ( "query.triggerTypeManual" ) , value : "manual" } ,
112
117
] ;
@@ -244,13 +249,13 @@ QueryCompTmp = class extends QueryCompTmp {
244
249
const isInputChangeTrigger = getTriggerType ( this ) === "onInputChange" ;
245
250
246
251
if (
247
- action . type === CompActionTypes . UPDATE_NODES_V2 &&
248
- (
252
+ action . type === CompActionTypes . UPDATE_NODES_V2
253
+ && (
249
254
isAutomatic
250
255
|| isInputChangeTrigger
251
256
|| ( 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)
254
259
) {
255
260
const next = super . reduce ( action ) ;
256
261
const depends = this . children . comp . node ( ) ?. dependValues ( ) ;
0 commit comments