-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[charts] Prevent pointer out from removing controlled highlight #20385
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
Conversation
|
Deploy preview: https://deploy-preview-20385--material-ui-x.netlify.app/ Bundle size report
|
| ...prevHighlight, | ||
| item: null, | ||
| lastUpdate: 'pointer', | ||
| isControlled: false, |
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.
Why do we change this to false? 🤔
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.
We don't really modify it. If it was true an early return would be trigger
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.
In the version you've seen few minutes ago, there were a ...prevHighlight I've removed but forgot to push
|
|
||
| store.set('highlight', { item: null, lastUpdate: 'pointer' }); | ||
| store.set('highlight', { | ||
| ...prevHighlight, |
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.
| ...prevHighlight, |
b680df2 to
ca3763e
Compare
JCQuintas
left a comment
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.
Should we have a test to prevent regression?
packages/x-charts/src/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.ts
Outdated
Show resolved
Hide resolved
CodSpeed Performance ReportMerging #20385 will not alter performanceComparing Summary
Footnotes |
Fix #20381
The issue come from the fact pointer event were still able to override the value even if controlled.