mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 01:18:23 +00:00
Storehelper fix
This commit is contained in:
parent
8f83e2bf5d
commit
387bee447f
1 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import { allOperations } from '@tooljet/plugins/client';
|
|||
import { capitalize, cloneDeep } from 'lodash';
|
||||
import { DATA_SOURCE_TYPE } from '@/_helpers/constants';
|
||||
import { useDataQueriesStore } from '@/_stores/dataQueriesStore';
|
||||
import useStore from '@/AppBuilder/_stores/store';
|
||||
|
||||
export const getDefaultOptions = (source) => {
|
||||
const isSchemaUnavailable = Object.keys(schemaUnavailableOptions).includes(source.kind);
|
||||
|
|
@ -42,7 +43,9 @@ export const getDefaultOptions = (source) => {
|
|||
|
||||
const computeQueryName = (source) => {
|
||||
const { kind, type } = source;
|
||||
const dataQueries = useDataQueriesStore.getState().dataQueries;
|
||||
// TODO: Might need to move this out
|
||||
// const dataQueries = useDataQueriesStore.getState().dataQueries;
|
||||
const dataQueries = useStore.getState().dataQuery.queries.modules.canvas;
|
||||
let currentQueriesForKind = dataQueries.filter((query) => query.kind === kind);
|
||||
if (type == DATA_SOURCE_TYPE.SAMPLE) {
|
||||
currentQueriesForKind = currentQueriesForKind.filter((query) => query.data_source_id === source.id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue