Skip to content
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

feat(Higcharts plugin): add type for manageTooltipConfig #139

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

korvin89
Copy link
Collaborator

Issue:

gifbug

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@@ -267,7 +267,7 @@ function initHighcharts({isMobile}) {

Highcharts.wrap(Highcharts.Tooltip.prototype, 'hide', function (proceed, ...rest) {
if (this.lastVisibleRowIndex) {
this.lastVisibleRowIndex = null;
this.lastVisibleRowIndex = undefined;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change null by undefined for consistency

allowComment: selectedLineIndex > tooltip.lastVisibleRowIndex,
allowComment:
typeof tooltip.lastVisibleRowIndex === 'number' &&
selectedLineIndex > tooltip.lastVisibleRowIndex,
Copy link
Collaborator Author

@korvin89 korvin89 Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was broke because of tooltip.lastVisibleRowIndex sometimes had null value, and

selectedLineIndex > tooltip.lastVisibleRowIndex // true

@korvin89 korvin89 merged commit f781cca into main Mar 21, 2023
@korvin89 korvin89 deleted the fix-highcharts-tooltip-commets branch March 21, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants