diff --git a/frontend/src/AppBuilder/_stores/slices/componentsSlice.js b/frontend/src/AppBuilder/_stores/slices/componentsSlice.js index 7e74a6a006..9075dbede2 100644 --- a/frontend/src/AppBuilder/_stores/slices/componentsSlice.js +++ b/frontend/src/AppBuilder/_stores/slices/componentsSlice.js @@ -1527,7 +1527,8 @@ export const createComponentsSlice = (set, get) => ({ }, turnOffAutoComputeLayout: async (moduleId = 'canvas') => { - const { app, getCurrentPageId, currentVersionId } = get(); + const { appStore, getCurrentPageId, currentVersionId } = get(); + const app = appStore.modules[moduleId].app; const currentPageId = getCurrentPageId(moduleId); set( (state) => { diff --git a/frontend/src/AppBuilder/_stores/slices/queryPanelSlice.js b/frontend/src/AppBuilder/_stores/slices/queryPanelSlice.js index 7344f54aec..f33f67c66e 100644 --- a/frontend/src/AppBuilder/_stores/slices/queryPanelSlice.js +++ b/frontend/src/AppBuilder/_stores/slices/queryPanelSlice.js @@ -539,7 +539,7 @@ export const createQueryPanelSlice = (set, get) => ({ }, previewQuery: (query, calledFromQuery = false, userSuppliedParameters = {}, moduleId = 'canvas') => { - const { eventsSlice, queryPanel, app, currentVersionId, selectedEnvironment } = get(); + const { eventsSlice, queryPanel, appStore, currentVersionId, selectedEnvironment } = get(); const { queryPreviewData, setPreviewLoading, @@ -563,6 +563,8 @@ export const createQueryPanelSlice = (set, get) => ({ let parameters = userSuppliedParameters; + const app = appStore.modules[moduleId].app; + // passing current env through props only for querymanager const { environmentId } = app; const currentAppEnvironmentId = selectedEnvironment?.id || '';