diff --git a/frontend/src/queries/nodes/DataVisualization/Components/SeriesTab.tsx b/frontend/src/queries/nodes/DataVisualization/Components/SeriesTab.tsx index 0d86d7ee5c2356..2d1c921bd28696 100644 --- a/frontend/src/queries/nodes/DataVisualization/Components/SeriesTab.tsx +++ b/frontend/src/queries/nodes/DataVisualization/Components/SeriesTab.tsx @@ -2,12 +2,10 @@ import { LemonButton, LemonLabel, LemonSelect } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { IconDelete, IconPlusMini } from 'lib/lemon-ui/icons' -import { dataNodeLogic } from '../../DataNode/dataNodeLogic' import { dataVisualizationLogic } from '../dataVisualizationLogic' export const SeriesTab = (): JSX.Element => { - const { columns, xData, yData } = useValues(dataVisualizationLogic) - const { responseLoading } = useValues(dataNodeLogic) + const { columns, xData, yData, responseLoading } = useValues(dataVisualizationLogic) const { updateXSeries, updateYSeries, addYSeries, deleteYSeries } = useActions(dataVisualizationLogic) const options = columns.map(({ name, label }) => ({ diff --git a/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx b/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx index 0d64ded3608ac0..e95b58f2a15a4b 100644 --- a/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx +++ b/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx @@ -46,7 +46,6 @@ export function DataTableVisualization(props: DataTableVisualizationProps): JSX. setQuery: props.setQuery, cachedResults: props.cachedResults, } - const builtDataVisualizationLogic = dataVisualizationLogic(dataVisualizationLogicProps) const dataNodeLogicProps: DataNodeLogicProps = { query: props.query.source, @@ -54,8 +53,20 @@ export function DataTableVisualization(props: DataTableVisualizationProps): JSX. cachedResults: props.cachedResults, } + return ( + + + + + + + + ) +} + +function InternalDataTableVisualization(props: DataTableVisualizationProps): JSX.Element { const { query, visualizationType, showEditingUI, showResultControls, sourceFeatures, response, responseLoading } = - useValues(builtDataVisualizationLogic) + useValues(dataVisualizationLogic) const setQuerySource = useCallback( (source: HogQLQuery) => props.setQuery?.({ ...props.query, source }), @@ -72,7 +83,7 @@ export function DataTableVisualization(props: DataTableVisualizationProps): JSX. } else if (visualizationType === ChartDisplayType.ActionsTable) { component = ( - - -
-
- {showEditingUI && ( - <> - - {sourceFeatures.has(QueryFeature.dateRangePicker) && ( -
- { - if (query.kind === NodeKind.HogQLQuery) { - setQuerySource(query) - } - }} - /> -
- )} - - )} - {showResultControls && ( - <> - -
-
- - -
-
- -
-
- - )} - {component} +
+
+ {showEditingUI && ( + <> + + {sourceFeatures.has(QueryFeature.dateRangePicker) && ( +
+ { + if (query.kind === NodeKind.HogQLQuery) { + setQuerySource(query) + } + }} + /> +
+ )} + + )} + {showResultControls && ( + <> + +
+
+ + +
+
+ +
-
- - - + + )} + {component} +
+
) } diff --git a/frontend/src/queries/query.ts b/frontend/src/queries/query.ts index 348a57059a2c3b..b8a147b570e8d1 100644 --- a/frontend/src/queries/query.ts +++ b/frontend/src/queries/query.ts @@ -107,7 +107,7 @@ async function executeQuery( queryId?: string ): Promise> { const queryAsyncEnabled = Boolean(featureFlagLogic.findMounted()?.values.featureFlags?.[FEATURE_FLAGS.QUERY_ASYNC]) - const excludedKinds = ['HogQLMetadata', 'EventsQuery', 'DataVisualizationNode'] + const excludedKinds = ['HogQLMetadata', 'EventsQuery'] const queryAsync = queryAsyncEnabled && !excludedKinds.includes(queryNode.kind) const response = await api.query(queryNode, methodOptions, queryId, refresh, queryAsync)