File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed
plugins/plugin-chart-table/src
src/explore/components/controls/ColumnConfigControl Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -590,14 +590,30 @@ const config: ControlPanelConfig = {
590
590
)
591
591
. forEach ( ( colname , index ) => {
592
592
if (
593
- explore . form_data . metrics ?. some (
594
- metric => getMetricLabel ( metric ) === colname ,
595
- ) ||
593
+ colname &&
594
+ ! colname . startsWith ( '%' ) &&
595
+ colnames . includes ( `% ${ colname } ` ) &&
596
596
explore . form_data . percent_metrics ?. some (
597
597
( metric : QueryFormMetric ) =>
598
598
getMetricLabel ( metric ) === colname ,
599
+ ) &&
600
+ ! explore . form_data . metrics ?. some (
601
+ ( metric : QueryFormMetric ) =>
602
+ getMetricLabel ( metric ) === colname ,
599
603
)
600
604
) {
605
+ return ;
606
+ }
607
+ const isMetric = explore . form_data . metrics ?. some (
608
+ metric => getMetricLabel ( metric ) === colname ,
609
+ ) ;
610
+ const isPercentMetric =
611
+ explore . form_data . percent_metrics ?. some (
612
+ ( metric : QueryFormMetric ) =>
613
+ `%${ getMetricLabel ( metric ) } ` === colname ,
614
+ ) ;
615
+
616
+ if ( isMetric || isPercentMetric ) {
601
617
const comparisonColumns =
602
618
generateComparisonColumns ( colname ) ;
603
619
comparisonColumns . forEach ( ( name , idx ) => {
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ export default memo(function ColumnConfigItem({
101
101
) }
102
102
trigger = "click"
103
103
placement = "right"
104
- styles = { { body : { width, height } } }
105
- rootClassName = "column-config-popover"
104
+ style = { { width, height } }
105
+ className = "column-config-popover"
106
106
>
107
107
< div css = { outerContainerStyle } >
108
108
< div css = { nameContainerStyle } >
@@ -117,7 +117,7 @@ export default memo(function ColumnConfigItem({
117
117
iconColor = { colors . grayscale . base }
118
118
/>
119
119
) }
120
- < Icons . CaretRightOutlined css = { caretIconStyle } />
120
+ < Icons . RightOutlined css = { caretIconStyle } />
121
121
</ div >
122
122
</ div >
123
123
</ Popover >
You can’t perform that action at this time.
0 commit comments