mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
feat(dashboard): implement boolean conditional formatting (#36338)
Co-authored-by: Morris <morrisho215215@gmail.com>
This commit is contained in:
@@ -907,10 +907,6 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
formatter: ColorFormatters[number],
|
||||
valueToFormat: any,
|
||||
) => {
|
||||
const hasValue =
|
||||
valueToFormat !== undefined && valueToFormat !== null;
|
||||
if (!hasValue) return;
|
||||
|
||||
const formatterResult =
|
||||
formatter.getColorFromValue(valueToFormat);
|
||||
if (!formatterResult) return;
|
||||
|
||||
@@ -797,7 +797,8 @@ const config: ControlPanelConfig = {
|
||||
if (
|
||||
coltypes[index] === GenericDataType.Numeric ||
|
||||
(!explore?.controls?.time_compare?.value &&
|
||||
coltypes[index] === GenericDataType.String)
|
||||
(coltypes[index] === GenericDataType.String ||
|
||||
coltypes[index] === GenericDataType.Boolean))
|
||||
) {
|
||||
acc.push({
|
||||
value: colname,
|
||||
|
||||
Reference in New Issue
Block a user