Skip to content
Snippets Groups Projects
Commit 5705d1ae authored by Tom Robinson's avatar Tom Robinson
Browse files

Don't override pivoted column name so that conditional formatting works

parent 907fa5ec
Branches
Tags
No related merge requests found
......@@ -66,18 +66,19 @@ export function pivot(data) {
if (idx === 0) {
// first column is always the coldef of the normal column
return data.cols[normalCol];
} else {
return {
...data.cols[cellCol],
// `name` must be the same for conditional formatting, but put the
// formatted pivotted value in the `display_name`
display_name: formatValue(value, { column: data.cols[pivotCol] }) || "",
// for onVisualizationClick:
_dimension: {
value: value,
column: data.cols[pivotCol],
},
};
}
let colDef = _.clone(data.cols[cellCol]);
colDef.name = colDef.display_name =
formatValue(value, { column: data.cols[pivotCol] }) || "";
// for onVisualizationClick:
colDef._dimension = {
value: value,
column: data.cols[pivotCol],
};
// delete colDef.id
return colDef;
});
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment