Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect selection of indexes when selecting row #225

Open
RodriFS-InflightVR opened this issue Apr 3, 2019 · 0 comments
Open

incorrect selection of indexes when selecting row #225

RodriFS-InflightVR opened this issue Apr 3, 2019 · 0 comments

Comments

@RodriFS-InflightVR
Copy link

RodriFS-InflightVR commented Apr 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant