Skip to content

plotOptions events issue when using state/redux #229

Open
@leonardolessa

Description

@leonardolessa

Bug or Feature Request?

Bug

Description

When you define events inside plotOptions, it look like the previous event listeners are not "dead" as you change the state, or someway the previous state keeps stored.

How to reproduce

Define an event inside plotOptions object and try to interact with state (or redux state) as it changes. At some point you'll get the previous state value.

In my project, I'm beeing able to reproduce using the redux state, for some reason the chart event gets several previous values of the redux store.

Live demo demonstrating bug

https://stackblitz.com/edit/react-1wm1vu
Just keep looking at the console and mouseOvering the chart until the state changes, the logger will log both null and "testing" after the state changes.

Versions

  • React JSX Highcharts version: 3.6.1 and 4.0.0-alpha
  • Highcharts version: 7.2.0
  • React version: 16.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs Highcharts fixRequires a fix on Highcharts, rather than this wrapper

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions