FormidableLabs / FormidableLabs/victory
sharedEvents in victoryChart disappears after initial interaction
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 536
- PR merge metrics
- No merged PRs in 30d
Description
# Bugs and Questions
### Checklist
- [x] This is not a `victory-native` specific issue. (Issues that only appear in `victory-native` should be opened [here](https://github.com/FormidableLabs/victory-native/issues/new))
- [x] I have read through the [FAQ](https://formidable.com/open-source/victory/docs/faq) and [Guides](https://formidable.com/open-source/victory/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
Contributor guide
Assessment
This issue has not been assessed yet.