Skip to content

Commit

Permalink
fix(table): condition formatting can't formate 0 values (apache#24008)
Browse files Browse the repository at this point in the history
  • Loading branch information
Always-prog authored Aug 24, 2023
1 parent a1a687c commit b194df8
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 b194df8

Please sign in to comment.