Skip to content

Commit

Permalink
fix(table): condition formatting can't formate 0 values (#24008)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0d5be8e)
  • Loading branch information
Always-prog authored and michael-s-molina committed Aug 24, 2023
1 parent 2554a89 commit f5d2075
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,10 @@ export default function TableChart<D extends DataRecord = DataRecord>(
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;
}
Expand Down

0 comments on commit f5d2075

Please sign in to comment.