fix: Pivot Table Conditional Formatting Doesn't Show All Options (#19071)

* fix: Pivot Table Conditional Formatting Doesn't Show All Options

* PR comments

* PR comments
This commit is contained in:
Diego Medina
2022-03-09 17:04:04 -05:00
committed by GitHub
parent 62ad574c24
commit 0e0beceac1
5 changed files with 42 additions and 9 deletions

View File

@@ -457,7 +457,10 @@ const config: ControlPanelConfig = {
label: t('Customize columns'),
description: t('Further customize how to display each column'),
renderTrigger: true,
mapStateToProps(explore, control, chart) {
shouldMapStateToProps() {
return true;
},
mapStateToProps(explore, _, chart) {
return {
queryResponse: chart?.queriesResponse?.[0] as
| ChartDataResponseResult
@@ -478,7 +481,10 @@ const config: ControlPanelConfig = {
description: t(
'Apply conditional color formatting to numeric columns',
),
mapStateToProps(explore, control, chart) {
shouldMapStateToProps() {
return true;
},
mapStateToProps(explore, _, chart) {
const verboseMap = explore?.datasource?.verbose_map ?? {};
const { colnames, coltypes } =
chart?.queriesResponse?.[0] ?? {};