From 34b4edb372e52c44daa9300f2d44734559d4b591 Mon Sep 17 00:00:00 2001 From: Vitor Avila <96086495+Vitor-Avila@users.noreply.github.com> Date: Wed, 26 Mar 2025 13:28:22 -0300 Subject: [PATCH] fix(table-chart): Do not show comparison columns config if time_compare is set to [] (#32863) (cherry picked from commit f0dc1e7527b3d13888c7bb4833da56c12c6aaa3c) --- .../plugins/plugin-chart-table/src/controlPanel.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx index 933ee6a0c1d..ef3a8e700c2 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 timeComparisonStatus = - !!explore?.controls?.time_compare?.value; + const timeComparisonStatus = !isEmpty( + explore?.controls?.time_compare?.value, + ); const { colnames: _colnames, coltypes: _coltypes } = chart?.queriesResponse?.[0] ?? {};