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

fix(data-table): ensure cleaning-up events #5743

Merged
merged 5 commits into from
Apr 1, 2020

Conversation

asudoh
Copy link
Contributor

@asudoh asudoh commented Mar 30, 2020

This change ensure Carbon handle management API is used for attaching events in vanilla data table, to avoid orphaned events.

Fixes #5742.

Changelog

Changed

  • .addEventListener() calls with this.manage(on()) calls, to participate those event handlers in component lifecycle management.

Testing / Reviewing

Testing should make sure:

  • The user interaction of vanilla data table' expand/collapse features still work.
  • The batch action bar still shows up when one of the rows is selected.

This change ensure Carbon handle management API is used for attaching
events in vanilla data table, to avoid orphaned events.

Fixes carbon-design-system#5742.
@asudoh asudoh requested review from emyarod, tw15egan and a team March 30, 2020 08:14
@ghost ghost removed their request for review March 30, 2020 08:14
@netlify
Copy link

netlify bot commented Mar 30, 2020

Deploy preview for carbon-elements ready!

Built with commit e0edfcb

https://deploy-preview-5743--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Mar 30, 2020

Deploy preview for carbon-components-react ready!

Built with commit e0edfcb

https://deploy-preview-5743--carbon-components-react.netlify.com

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, testing with the example code the event handlers appear to be released correctly

@tw15egan tw15egan requested a review from a team as a code owner March 30, 2020 19:54
@ghost ghost requested a review from joshblack March 30, 2020 19:54
Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to still work as expected 👍 ✅

@asudoh asudoh merged commit e83aabf into carbon-design-system:master Apr 1, 2020
@asudoh asudoh deleted the data-table-events branch April 1, 2020 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Releasing a data-table does not remove its event handlers
3 participants