react-redux-grid
react-redux-grid copied to clipboard
incorrect selection of indexes when selecting row
Hi, Ben. I recently found out that you can do lazy-loading of the grid when you have a great amount of data with "infinite = true". However, when you enable lazy-loading and select rows, the array of indexes of selected rows have incorrect values.
I was able to get the correct indexes by doing:
let selection = this.props.gridSelection.get(this.props.gridConfig.stateKey)
let selectionData = selection.toJS();
let selectionIndexes = Object.keys(selectionData).map(key => {
if (selectionData[key]) {
let selectedId = key.split("row-")[1];
if ("NaN" !== String(Number(selectedId))) return selectedId;
}
}).filter(x => !!x)
Also, sorting doesn't seem to work either