Hi, I have handsontable in an angular 6 application, and notice that some options don’t seem to be available via the wrapper
For example, in Angular JS you can call gridInstance.sortingEnabled and gridInstance.sortColumn to resolve the physical index for a row in a of a sorted grid
Sadly it doesn’t help, as it doesn’t appear to expose the information that I need.
Basically I need to know if the grid is Sorted and, then get the row data by index
The AngularJS calls we use are:
To Ascertain sorting status -
grid,sortingEnabled
grid.sortColumn
To get the row data from a sorted grid (if the conditions above are true)
grid.sortIndex[idx][0];
Can you please let me know how these are exposed via the Angular wrapper?
An example detailing the Angular version of the solution posted in the link would be very useful!
I just need to reliably get the row data when the grid is sorted.
In AngularJs, we use the solution in the post from my original question, but there isn’t an obvious way to implement this with the Angular wrapper
On clicking a Row, I need to get the data of the row whether the grid is sorted or now
Let me know if you need any more info
Thanks,
Matt
Sorry I was in a rush and didn’t explain myself correctly…
I’ve updated the stackblitz to demonstrate the issue I am facing,
On the amend of a cell, I need to capture the row source data because we have multiple dependent values to resolve based on the value set.
When the grid is sorted, the change event does not give the physical row index of the data.
To reproduce, leave the grid unsorted and change the value of a cell
In the console, you will see that the source data for the row is output correctly,
Now sort the grid, and change a cell. You will see that the value output in the log is NOT the expected source data.
I need a way to get the source row data on a change event even when the grid is sorted