From ff3b98e388ff2d6cdc2a8d5be84bbe6586c04e09 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Tue, 13 Jan 2026 12:12:58 -0800 Subject: [PATCH] fix(chart): use setDataMask prop as fallback when actions.updateDataMask is absent Ensures custom setDataMask handlers work in non-dashboard/embedded contexts. Co-Authored-By: Claude Opus 4.5 --- superset-frontend/src/components/Chart/ChartRenderer.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/components/Chart/ChartRenderer.tsx b/superset-frontend/src/components/Chart/ChartRenderer.tsx index 27a69243645..a2c66662ea7 100644 --- a/superset-frontend/src/components/Chart/ChartRenderer.tsx +++ b/superset-frontend/src/components/Chart/ChartRenderer.tsx @@ -235,7 +235,11 @@ class ChartRenderer extends Component { onFilterMenuClose: this.props.onFilterMenuClose, onLegendStateChanged: this.handleLegendStateChanged, setDataMask: (dataMask: DataMask) => { - this.props.actions?.updateDataMask?.(this.props.chartId, dataMask); + if (this.props.actions?.updateDataMask) { + this.props.actions.updateDataMask(this.props.chartId, dataMask); + } else { + this.props.setDataMask?.(dataMask); + } }, onLegendScroll: this.handleLegendScroll, onChartStateChange: this.props.onChartStateChange,