Closed trickysan closed 8 years ago
Replicated
Hi Cagatay,
The fix seems easy, I've tested this fix on datatableselection.html with both single and multiple, and on datatable.html with remote lazy table after add single selection and then multiple selection feature to it.
Would you review, test too?
I've just changed greater than operator to greater than or equal operator in datatable.js in getSelection function ;
for(var i = 0; i < this.selection.length; i++) {
if(this.data.length > this.selection[i]-first && this.selection[i]-first >= 0) {
The only thing I concern is what happen on multiple selection maden from different page of lazy, current situation gets only selections of the current page,
The fix from @aozkesek works for me as expected.
I'm rewriting the selection impl to fix this and a couple of other issues for 4.1.1.
Fixed for 4.1.1.
If the first row in puidatatable is selected, the call of "getSelection" returns an empty result. It only works starting with the second row.
Reproduction of issue:
$('#tblsingle').puidatatable('getSelection')
Result: []$('#tblsingle').puidatatable('getSelection')
Result : [Object { vin="af4407ea", brand="Honda", year=1964, mehr..