victory
victory copied to clipboard
sharedEvents in victoryChart disappears after initial interaction
Bugs and Questions
Checklist
-
[x] This is not a
victory-native
specific issue. (Issues that only appear invictory-native
should be opened here) -
[x] I have read through the FAQ and Guides before asking a question
-
[x] I am using the latest version of Victory
-
[x] I've searched open issues to make sure I'm not opening a duplicate issue
The Problem
I have a chart that can be toggled on/off( show or hide) upon clicking its legend(VictoryLegend). After updating my package from 35.4.8 to the latest victory library package, my events seem to have disappeared after initial interaction. I am unable to toggle my chart continuously. i can only do it once
Initial render:(my sharedEvents exist)
After initial interaction( toggle once):
sharedEvents props disappeared
Downgrading my victory version back, seems to enable my toggle event to work again. Is there any breaking changes from 35.4.9 onwards with regards to how events are supposed to be used? Or am i using handling events wrongly?
Any help would be much appreciated :)
Reproduction
I have created a demo codesandbox: https://codesandbox.io/s/cranky-meadow-fmgjh?file=/src/App.js
I've skimmed through the diff, the bug seems to be introduced here: https://github.com/FormidableLabs/victory/pull/1789