feat: conditional formatting improvements in tables (#34330)

This commit is contained in:
SBIN2010
2025-08-19 01:13:16 +03:00
committed by GitHub
parent 1f482b42eb
commit 852adaa6cc
12 changed files with 571 additions and 76 deletions

View File

@@ -413,6 +413,8 @@ const config: ControlPanelConfig = {
? (explore?.datasource as Dataset)?.verbose_map
: (explore?.datasource?.columns ?? {});
const chartStatus = chart?.chartStatus;
const { colnames, coltypes } =
chart?.queriesResponse?.[0] ?? {};
const metricColumn = values.map(value => {
if (typeof value === 'string') {
return {
@@ -420,9 +422,15 @@ const config: ControlPanelConfig = {
label: Array.isArray(verboseMap)
? value
: verboseMap[value],
dataType: colnames && coltypes[colnames?.indexOf(value)],
};
}
return { value: value.label, label: value.label };
return {
value: value.label,
label: value.label,
dataType:
colnames && coltypes[colnames?.indexOf(value.label)],
};
});
return {
removeIrrelevantConditions: chartStatus === 'success',