@@ -175,6 +175,17 @@ export default class ChartClickActions extends Component {
175
175
} ) ;
176
176
delete groupedClickActions [ "sum" ] ;
177
177
}
178
+ if (
179
+ clicked . column &&
180
+ clicked . column . source === "native" &&
181
+ groupedClickActions [ "sort" ]
182
+ ) {
183
+ // restyle the Formatting action for SQL columns
184
+ groupedClickActions [ "sort" ] [ 0 ] = {
185
+ ...groupedClickActions [ "sort" ] [ 0 ] ,
186
+ buttonType : "horizontal" ,
187
+ } ;
188
+ }
178
189
const sections = _ . chain ( groupedClickActions )
179
190
. pairs ( )
180
191
. sortBy ( ( [ key ] ) => ( SECTIONS [ key ] ? SECTIONS [ key ] . index : 99 ) )
@@ -274,7 +285,7 @@ export const ChartClickAction = ({
274
285
const className = cx ( "cursor-pointer no-decoration" , {
275
286
"text-center sort token-blue mr1 bg-brand-hover" :
276
287
action . buttonType === "sort" ,
277
- "formatting-button flex-align-right text-brand-hover" :
288
+ "formatting-button flex-align-right text-brand-hover text-light " :
278
289
action . buttonType === "formatting" ,
279
290
"horizontal-button p1 flex flex-auto align-center bg-brand-hover text-dark text-white-hover" :
280
291
action . buttonType === "horizontal" ,
@@ -312,16 +323,14 @@ export const ChartClickAction = ({
312
323
</ Link >
313
324
</ div >
314
325
) ;
315
- } else if ( action . tooltip ) {
316
- // Only the Sort and Formatting actions have tooltips.
326
+ } else if (
327
+ action . buttonType === "sort" ||
328
+ action . buttonType === "formatting"
329
+ ) {
317
330
return (
318
331
< Tooltip tooltip = { action . tooltip } >
319
332
< div
320
- className = { cx ( className , {
321
- "flex flex-row align-center" :
322
- action . buttonType === "formatting" ||
323
- action . buttonType === "sort" ,
324
- } ) }
333
+ className = { cx ( className , "flex flex-row align-center" ) }
325
334
onClick = { ( ) => handleClickAction ( action ) }
326
335
>
327
336
{ action . icon && (
@@ -334,7 +343,6 @@ export const ChartClickAction = ({
334
343
name = { action . icon }
335
344
/>
336
345
) }
337
- { action . title && action . title }
338
346
</ div >
339
347
</ Tooltip >
340
348
) ;
0 commit comments