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

Fixed the way event listeners are removed #731

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

Yama-Tomo
Copy link
Contributor

@Yama-Tomo Yama-Tomo commented Sep 29, 2024

relate: #716

Fixed a problem in strict mode where removing an event listener using removeAllListeners would remove all added event listeners.
Also fixed a problem where event listeners would not be re-registered when a new callback was passed due to re-rendering. 1

Footnotes

  1. fix: fix problem loading events in tables when displayed for the firs… #709 Probably, this changes prevented listeners from re-registering when the props was changed.

Copy link

vercel bot commented Sep 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-google-charts-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 3:50pm

@rakannimer
Copy link
Owner

rakannimer commented Sep 29, 2024

Thank you @Yama-Tomo for this PR !

I am working on migrating the class components to function components, any chance you can rebase this on top of [migrate-to-turbo](https://github.com/rakannimer/react-google-charts/tree/migrate-to-turbo). I will be moving it shortly to master.

@Yama-Tomo
Copy link
Contributor Author

@rakannimer Rebased code.
Fixed all event addition and removal to use useEffect.

@rakannimer rakannimer merged commit 651d14c into rakannimer:master Oct 2, 2024
4 checks passed
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.

2 participants