reactjs - How to prevent row selection after clicking on link inside custom rendered cell in AgGrid -
i using aggrid , have rowselection="multiple"
on grid, have {cellrendererframework: printcell}
on last column, small component displays link.
i want so, when click on link inside printcell
, action should executed, without altering the state of grid itself, , keep current selected lines selected without making row containing link selected. tried doing event.stoppropagation
, event.preventdefault
prevent parent row getting selected, no avail.
any idea how achieve ? thanks
since row click specified behaviour might easier perhaps use checkbox selection , disable focus row selection entirely. if want keep path generated required behaviour intercepting event in cell focus , blocking row selection there.
private oncellfocused($event) { if($event.column && $event.column.colid == "commentid"){ this.gridoptions.suppressrowclickselection = true; } else { this.gridoptions.suppressrowclickselection = false; }
this switches row selection event of entirely if select column don't want behaviour occur (caveats: angular 2 example , have wrapped ag-grid inside our own component.
hope helps...
Comments
Post a Comment