bovin.a
(Bovin A)
1
Here is an example for reproducing the issue: https://jsfiddle.net/u6jghf23/10/
I use a table with data schema and arrays of objects as a data source.
Steps to reproduce:
- Select and move second row up
- Edit cell A1
- After editing you’ll see two alerts:
- First with cell row index
- Second with original object corresponding to that row
It’s not correct because row index in this case is equal to 1, but must be equal to 0 for correct matching with original data source array.
Can you help me? May be I’m doing something wrong.
bovin.a
(Bovin A)
2
I guess that I’ve figured out how it works.
ColumnSettings object has ‘row’ and ‘visualRow’ properties:
- ‘row’ property equals to index in data source array
- ‘visualRow’ property equals to row index in UI
There is no need to use .toPhysicalRow() function to get index in original array. Value in ‘row’ property can be used directly.
Hey @bovin.a
It’s great to see that you’ve found an answer that you were looking for. Is there anything I can help you with?
bovin.a
(Bovin A)
4
Hi, @aleksandra_budnik
Thank you for reply. My problem is solved.
Great. I guess that we can close the topic.