mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
fix(table): condition formatting can't formate 0 values (#24008)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user