From b194df8f9fa4b520f00e79afe76dd2737c757d95 Mon Sep 17 00:00:00 2001 From: Stepan <66589759+Always-prog@users.noreply.github.com> Date: Thu, 24 Aug 2023 17:01:40 +0300 Subject: [PATCH] fix(table): condition formatting can't formate 0 values (#24008) --- .../plugins/plugin-chart-table/src/TableChart.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index fd5ce8aa3efed..72bcb71d290fa 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -461,9 +461,10 @@ export default function TableChart( columnColorFormatters! .filter(formatter => formatter.column === column.key) .forEach(formatter => { - const formatterResult = value - ? formatter.getColorFromValue(value as number) - : false; + const formatterResult = + value || value === 0 + ? formatter.getColorFromValue(value as number) + : false; if (formatterResult) { backgroundColor = formatterResult; }