Describe the bug
I am using pageSize: 20 for pagination; on going to second page(that is from row 21), if try to select a row, the visual effect of checkbox selection is not happening and if i try to select row 1 from second page (that is row 21 in actual table ) row 1(from actual table ) is getting selected instead of 21(from page 1).
To Reproduce
My code-
onSelectionChange={data => this.selectionChanged(data)}
selectionChanged = data => {
console.log(data);
let jobs = [];
let count = 0;
this.setState({ checked: true });
data.forEach((element, index, array) => {
count++;
jobs.push(element._id);
if (count === array.length) {
this.setState({ JobId: jobs }, () => console.log(this.state.JobId));
console.log(jobs, "ids");
console.log(array.length);
}
});
};
Expected behavior
I expected correct rows to be selected.
Desktop (please complete the following information):
Additional context
Is this related to calling setState in OnSelectionchange? If yes, what could be the possible alternatives?
Hi @uplsaurabhA ,
Which version do you use? I tested it in latest version and it seems working properly.
1.17.0
Latest version is 1.34.1 now :). I fixed it on previous version.
Thanks, issue resolved after updating.