I am trying to get the sorted rows ids from the data grid. As I am using an older version of data grid from material UI is there any solution to get the sorted row ids in a state variable?
Using the below example it works with newer version of data grid, so please let me know if any other method to get the same using older version.
<DataGrid
onStateChange={(state) => {
const newRows = gridVisibleSortedRowIdsSelector(state);
setVisibleRows(newRows);
}}
rows={rows}
columns={columns}
/>
Please use this link as an example: https://codesandbox.io/s/d3ex9?file=/src/App.tsx
Versions:
@material-ui/core: 4.11
@material-ui/data-grid: 4.00-aplha:35