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): block (rowClick) event when clicking on checkbox (closes #611) #619

Merged
merged 3 commits into from
May 24, 2017

Conversation

emoralesb05
Copy link
Contributor

even though clicking on the checkbox is still clicking on the row, we need to block this since people want to navigate when clicking on row and select when clicking on checkbox.

#611

What's included?

  • block (rowClick) event when click event target is md-pseudo-checkbox
  • unit test for this particular use case

Test Steps

General Tests for Every PR

  • ng serve --aot still works.
  • npm run lint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.

even though clicking on the checkbox is still clicking on the row, we need to block this since people want to navigate when clickin on row and select when clicking on checkbox
@emoralesb05 emoralesb05 added this to the Beta.5 milestone May 24, 2017
…on, added an attribute to the tag to look for. Looking for the tag name could be problamatic in that what if someone wants to put their own md-pseudo-checkbox on a cell.
@jeremysmartt
Copy link
Collaborator

jeremysmartt commented May 24, 2017

Made an update to this. Instead of looking for a tag name (MD-PSEUDO-CHECKBOX) to know to stop the event propogation, I added an attribute to the tag to look for. Looking for the tag name could be problematic in that what if someone wants to put their own md-pseudo-checkbox on a cell and doesn't want the event to be stopped. And in fact anyone could now use this new attribute stopRowClick on any of their own cells if they wanted to stop the event from happening for any number of reasons.

@emoralesb05
Copy link
Contributor Author

Awesome, its more flexible this way and not dependent of the element.

@emoralesb05 emoralesb05 merged commit ec1cbd8 into develop May 24, 2017
@emoralesb05 emoralesb05 deleted the feature/clickable-fix branch May 24, 2017 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants