Prevent selection of the row when any button click in a row
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 any button clicked in any cell it also selects the row. Eg: Image
Expected behavior
There should be a callback where we can determine that a particular button is clicked on that basis we can prevent the row selection. currently there is a property [selectCheck]
which takes a function with argument of the row checkSelectable(event)
it should have the actual event as well like: checkSelectable($event, row)
from the event we can detect which dom is clicked ?
Reproduction of the problem
Add a custom column name it action
in that column add <button>
now if you click that button it will select that row.
Please tell us about your environment: Ubuntu, WebStorm
-
Table version: ^7.1.1
-
Angular version: 4x
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top GitHub Comments
I’ve tried to figure out a solution for myself, here is what I did:
In component.ts
In component.html
use event.stopPropagation(); within your click method