Select in combination with SSP
Select in combination with SSP
Heyho!
Working with the new extension select leads to some odd beheavior. Line 415 gets the current selected lines which is fine.
https://github.com/DataTables/Select/blob/master/js/dataTables.select.js#L415
// On the next draw, reselect the currently selected items
api.one( 'draw.dt.dtSelect', function () {
api.rows( rows ).select();
In combination with server side on, something goes wrong if you do some action (search, order or anything else). With select multi
all lines get selected and with single
of course only the last one.
On line 7661 it just returns all current rows or am i wrong?.
https://github.com/DataTables/DataTables/blob/1.10.8/media/js/jquery.dataTables.js#L7661
if ( _fnDataSource( settings ) == 'ssp' ) {
// In server-side processing mode, most options are irrelevant since
// rows not shown don't exist and the index order is the applied order
// Removed is a special case - for consistency just return an empty
// array
return search === 'removed' ?
[] :
_range( 0, displayMaster.length );
}
Replies
Same problem as reported here:
http://datatables.net/forums/discussion/29463/select-extension-and-server-
side-processing
and here:
http://datatables.net/forums/discussion/29708/select-extension-and-serverside-option-bug
Ah your right, I searched for issues, but haven't saw them.. I am sorry.
In commit
4f27154fe459a415eb1d0df4e904fe91b9dc372e
, everything works fine now!@bgeneto can you counter check this with your example?
https://github.com/DataTables/DataTables/commit/4f27154fe459a415eb1d0df4e904fe91b9dc372e
Indeed this last commit (finally) solved the select plugin problem when used along with server-side processing! You can check my updated use case here:
http://bit.ly/1UnICPb
Thanks for your reply, I was waiting for this fix for two long weeks!