mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fix: Passed the correct app value to the preview query and autoLayout
This commit is contained in:
parent
1d15cddbfd
commit
6bdc165ba2
2 changed files with 5 additions and 2 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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 || '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue