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

TreeGrid axis does not remove label icons on data update #16673

Closed
pawelfus opened this issue Nov 18, 2021 · 0 comments · Fixed by #16773
Closed

TreeGrid axis does not remove label icons on data update #16673

pawelfus opened this issue Nov 18, 2021 · 0 comments · Fixed by #16773

Comments

@pawelfus
Copy link
Contributor

Expected behaviour

After updating data, unnecessary label icons are left.

Actual behaviour

The unnecessary label icons should be removed.

Live demo with steps to reproduce

Wait 2 secs to observe the issue
https://jsfiddle.net/BlackLabel/3Ljoa0he/3/

Product version

Highcharts Gantt v8.1.0+

Workaround

Snippet:

Highcharts['_modules']['Core/Axis/TreeGridTick.js'].Additions.prototype.destroy = function() {
  if (this.labelIcon) {
    this.labelIcon.destroy();
  }
}

Demo: https://jsfiddle.net/BlackLabel/3Ljoa0he/2/

Internal note:
It seems to be a regression after moving TreeGrid into a composition. Previously, all icons used to be removed automatically in Tick.destroy(), which simply goes over all properties in a Tick instance, and if destroy() is available - calls it. Now, with composition, Tick.treeGridTick does not have destroy(), so the property is simply deleted, leaving the icon in DOM. Workaround (and the solution) is to add destroy() to the composition (like above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants