-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TSVB] Fixes cursor type for topN charts with drilldowns #115333
Conversation
Pinging @elastic/kibana-vis-editors (Team:VisEditors) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
To update your PR or re-run it, just comment with: |
row: { | ||
cursor: 'pointer', | ||
}, | ||
}, | ||
}, | ||
this.props | ||
{ | ||
onClickStyle: typeof this.props.onClick === 'function', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know TSVB very well so I am not sure what sits in this.props
(or what reactcss
does 😅 ), but wouldn't it be safer to do
{
...this.props,
onClickStyle: typeof this.props.onClick === 'function',
to not leave out anything? Honestly it's more of a question than review :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it too but then I read the reactcss
documentation and styling works like that:
const styles = reactCSS({
'default': {
card: {
background: '#fff',
boxShadow: '0 2px 4px rgba(0,0,0,.15)',
},
},
'zIndex-2': {
card: {
boxShadow: '0 4px 8px rgba(0,0,0,.15)',
},
},
}, {
'zIndex-2': props.zIndex === 2,
})
You define the stylename and the condition. I don't think that by adding the props will make any change because this is not how reactcss works. Do you think I am missing something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaaaah... Makes sense. So it actually didn't make sense before because there's just this one custom style. Thanks for explaining!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on FF and it works correct now!
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Summary
Fixes #109593
in TopN charts, when we are adding a drilldown, we want the cursor to change into a pointer. Although the logic seemed to exist, it was broken. This PR fixes the problem.