mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -235,7 +235,11 @@ class ChartRenderer extends Component<ChartRendererProps, ChartRendererState> {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user