In ag-grid how do I make the active row color change to the selected row when the keyboard is used to navigate cells

63 views Asked by At

See below, when I used the keyboard arrow keys to move 1 row down, the highlighted row is still the one above it:

enter image description here

1

There are 1 answers

0
Ahmet Firat Keler On BEST ANSWER

Pretty simple!

Apply setSelected method after finding the row your mouse focused using onCellFocused event.

onCellFocused : function(params) {
  params.api.getRowNode(params.rowIndex).setSelected(true);
}

Here's the working example: https://plnkr.co/edit/L7dGwgp3xYWunOFH