mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Go to app - on success event fixed (#1360)
* Goto app handler, when run as the on-success event handler of query, it should not ask for confirmation, in the viewer * Goto app handler, when run as the on-success event handler of query, it should not ask for confirmation, in the viewer
This commit is contained in:
parent
44f3b9d8d0
commit
e21f1cfd3f
2 changed files with 4 additions and 4 deletions
|
|
@ -766,7 +766,7 @@ class Editor extends React.Component {
|
|||
selectedComponent={selectedComponent || {}}
|
||||
scaleValue={scaleValue}
|
||||
appLoading={isLoading}
|
||||
onEvent={(eventName, options) => onEvent(this, eventName, options)}
|
||||
onEvent={(eventName, options) => onEvent(this, eventName, options, 'edit')}
|
||||
onComponentOptionChanged={(component, optionName, value) =>
|
||||
onComponentOptionChanged(this, component, optionName, value)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ function executeAction(_ref, event, mode) {
|
|||
|
||||
case 'run-query': {
|
||||
const { queryId, queryName } = event;
|
||||
return runQuery(_ref, queryId, queryName);
|
||||
return runQuery(_ref, queryId, queryName, true, mode);
|
||||
}
|
||||
|
||||
case 'open-webpage': {
|
||||
|
|
@ -366,7 +366,7 @@ export function previewQuery(_ref, query) {
|
|||
});
|
||||
}
|
||||
|
||||
export function runQuery(_ref, queryId, queryName, confirmed = undefined) {
|
||||
export function runQuery(_ref, queryId, queryName, confirmed = undefined, mode) {
|
||||
const query = _ref.state.app.data_queries.find((query) => query.id === queryId);
|
||||
let dataQuery = {};
|
||||
|
||||
|
|
@ -515,7 +515,7 @@ export function runQuery(_ref, queryId, queryName, confirmed = undefined) {
|
|||
},
|
||||
() => {
|
||||
resolve();
|
||||
onEvent(_self, 'onDataQuerySuccess', { definition: { events: dataQuery.options.events } });
|
||||
onEvent(_self, 'onDataQuerySuccess', { definition: { events: dataQuery.options.events } }, mode);
|
||||
}
|
||||
);
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue