Skip to content

Conversation

@korommatyi
Copy link

The original code doesn't handle the case when the event handler changes on an update.

My use case:

  • I have a chart on my page. A click on a bar selects the corresponding category, so the chart is updated, the selected bar becomes more prominent while the other bars become almost transparent.
  • In this state, a click deselects the previously selected category, removing all the highlight effects.

Currently this is impossible since the click handler is not updated when a new one is provided in the props on update.

I haven't found any contribution guide, so let me know if there are some steps I should take before this can be merged.

@erbenpeter
Copy link

It seems #151 deals with similar issues. Have you checked that one?

@korommatyi
Copy link
Author

Ah, indeed. I didn't check other PRs... I will close this in favor of #151. That one even has a test! 😄

@korommatyi korommatyi closed this Aug 29, 2019
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