From c55a9214e123d93c5ef893c55392d30ae193d9da Mon Sep 17 00:00:00 2001 From: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com> Date: Thu, 10 Sep 2020 11:05:45 +0530 Subject: [PATCH] Fixes (#522) - Remove cache fields from settings - Call the event callback method with success false to fix button widget loading issue --- .../src/mockResponses/ActionSettings.tsx | 44 +++++++++---------- app/client/src/sagas/ActionExecutionSagas.ts | 3 ++ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/app/client/src/mockResponses/ActionSettings.tsx b/app/client/src/mockResponses/ActionSettings.tsx index be93bbb324..9af4caa78c 100644 --- a/app/client/src/mockResponses/ActionSettings.tsx +++ b/app/client/src/mockResponses/ActionSettings.tsx @@ -15,17 +15,17 @@ export const queryActionSettingsConfig = [ controlType: "SWITCH", info: "Ask confirmation from the user everytime before refreshing data", }, - { - label: "Cache response", - configProperty: "shouldCacheResponse", - controlType: "SWITCH", - }, - { - label: "Cache timeout (in milliseconds)", - configProperty: "cacheTimeout", - controlType: "INPUT_TEXT", - dataType: "NUMBER", - }, + // { + // label: "Cache response", + // configProperty: "shouldCacheResponse", + // controlType: "SWITCH", + // }, + // { + // label: "Cache timeout (in milliseconds)", + // configProperty: "cacheTimeout", + // controlType: "INPUT_TEXT", + // dataType: "NUMBER", + // }, { label: "Query Timeout (in milliseconds)", configProperty: "actionConfiguration.timeoutInMillisecond", @@ -53,17 +53,17 @@ export const apiActionSettingsConfig = [ controlType: "SWITCH", info: "Ask confirmation from the user everytime before refreshing data", }, - { - label: "Cache response", - configProperty: "shouldCacheResponse", - controlType: "SWITCH", - }, - { - label: "Cache timeout (in milliseconds)", - configProperty: "cacheTimeout", - controlType: "INPUT_TEXT", - dataType: "NUMBER", - }, + // { + // label: "Cache response", + // configProperty: "shouldCacheResponse", + // controlType: "SWITCH", + // }, + // { + // label: "Cache timeout (in milliseconds)", + // configProperty: "cacheTimeout", + // controlType: "INPUT_TEXT", + // dataType: "NUMBER", + // }, { label: "Api Timeout (in milliseconds)", configProperty: "actionConfiguration.timeoutInMillisecond", diff --git a/app/client/src/sagas/ActionExecutionSagas.ts b/app/client/src/sagas/ActionExecutionSagas.ts index 3fb35e3f74..dd26bee5c1 100644 --- a/app/client/src/sagas/ActionExecutionSagas.ts +++ b/app/client/src/sagas/ActionExecutionSagas.ts @@ -289,6 +289,9 @@ export function* executeActionSaga( if (api.confirmBeforeExecute) { const confirmed = yield call(confirmRunActionSaga); if (!confirmed) { + if (event.callback) { + event.callback({ success: false }); + } return; } }