Get physical row index after filtering

Hello there!
Question: is there a quick and easy way to get a physical row index (I believe that what it is called) in afterChange hook if I apply filters?

I have a data grid:

|   | A      |
|---|--------|
| 1 | first  |
| 2 | second |
| 3 | third  |

When I apply a filter I get data grid:

|   | A      |
|---|--------|
| 1 | third  |

when I edit a cell at A1 I want to get a physical row (“original row index”) in afterChange hook - so afterChange: (change)=> console.log(change[0][0]) should return/log 2 but it is logging 0 (so it passes visual row index).

Hi @alojzy231

In general you can use the toPhysicaRow method to convert visual indexes to the physical ones: Core API reference - JavaScript Data Grid | Handsontable

1 Like