two event are triggred when row is selected (selectionType=checkbox): Select Event & Activate Event
See original GitHub issueI’m submitting a … (check one with “x”)
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here
Current behavior
When a row is selected with checkbox mode, two events are triggered :Select Event & Activate Event
Expected behavior
When a row’s checkbox is selected, only the Select Event should be triggred. When a row is clicked outside the checkbox only the Activate Event should be triggred.
Reproduction of the problem
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Table version: 0.7.x
5.0.0
- Angular version: 2.0.x
angular-cli: 1.0.0-beta.25.5 node: 6.9.2 os: darwin x64 @angular/common: 2.4.4 @angular/compiler: 2.4.4 @angular/core: 2.4.4 @angular/forms: 2.4.4 @angular/http: 2.4.4 @angular/material: 2.0.0-beta.1 @angular/platform-browser: 2.4.4 @angular/platform-browser-dynamic: 2.4.4 @angular/platform-server: 2.4.4 @angular/router: 3.2.0 @angular/compiler-cli: 2.4.4
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome 53.0.2785.101 (64-bit)
- Language: [all | TypeScript X.X | ES6/7 | ES5] TypeScript 2.0.3
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9
Top GitHub Comments
This approach worked for me (checkbox in first cell i.e. cellIndex = 0):
@richardrooks I’ve got the same issue, I’ll separate checkbox event and click event. I found a workaround in waiting of update.
In case, you’ve got the datatable :
As the click event is running twice and the first is the checkbox event, I stop the propagation as below :
I guess that isn’t a very good option but it make the job for now.