Skip to content

Commit e4709f5

Browse files
committed
feat: Activate shared filters for "tab" layout in configurator mode
1 parent 7cba90c commit e4709f5

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

app/components/chart-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Box, BoxProps, Theme } from "@mui/material";
22
import { makeStyles } from "@mui/styles";
33
import clsx from "clsx";
4-
import React, { forwardRef, HTMLProps } from "react";
4+
import React, { HTMLProps, forwardRef } from "react";
55

66
import ChartPanelLayoutCanvas, {
77
chartPanelLayoutGridClasses,

app/components/chart-preview.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
} from "@/components/chart-table-preview";
3737
import { useChartStyles } from "@/components/chart-utils";
3838
import { ChartWithFilters } from "@/components/chart-with-filters";
39+
import { DashboardInteractiveFilters } from "@/components/dashboard-interactive-filters";
3940
import DebugPanel from "@/components/debug-panel";
4041
import { DragHandle, DragHandleProps } from "@/components/drag-handle";
4142
import Flex from "@/components/flex";
@@ -85,6 +86,11 @@ export const ChartPreview = (props: ChartPreviewProps) => {
8586
// we switch tabs in the configurator, otherwise we end up with the wrong
8687
// data in the downstream hooks (useDataCubesMetadataQuery, etc.)
8788
<ChartTablePreviewProvider key={state.activeChartKey}>
89+
{state.state !== "CONFIGURING_CHART" ? (
90+
<DashboardInteractiveFilters
91+
key={state.chartConfigs.map((x) => x.key).join(",")}
92+
/>
93+
) : null}
8894
<ChartWrapper editing={editing} layoutType={layout.type}>
8995
<ChartPreviewInner dataSource={dataSource} />
9096
</ChartWrapper>

app/configurator/components/layout-configurator.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ const LayoutSharedFiltersConfigurator = () => {
209209
);
210210

211211
switch (layout.type) {
212+
case "tab":
212213
case "dashboard":
213214
return (
214215
<ControlSection

0 commit comments

Comments
 (0)