This is an automated email from the ASF dual-hosted git repository. vavila pushed a commit to branch fix/handle-empty-time-compare in repository https://gitbox.apache.org/repos/asf/superset.git
commit ae126997052a1b72b04c2ec26800a0578995e5bb Author: Vitor Avila <[email protected]> AuthorDate: Wed Mar 26 00:22:05 2025 -0300 fix(table-chart): Do not show comparison columns config if time_compare is set to [] --- superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx index 933ee6a0c1..4972b1d81c 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx @@ -486,8 +486,9 @@ const config: ControlPanelConfig = { return true; }, mapStateToProps(explore, _, chart) { + const timeComparevalue = explore?.controls?.time_compare?.value; const timeComparisonStatus = - !!explore?.controls?.time_compare?.value; + Array.isArray(timeComparevalue) ? timeComparevalue.length > 0 : !!timeComparevalue; const { colnames: _colnames, coltypes: _coltypes } = chart?.queriesResponse?.[0] ?? {};
