mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Fix: fnServerData compatiblity for 1.9-
- fnServerData's second parameter should be an array of objects with name/value pairs. It was being passed through as the more modern object, but fnServerData is only present for compatiblity with 1.9 and should the original format should be retained. This is done with a simple map function
This commit is contained in:
parent
b5228162a7
commit
90870af5ac
@ -1 +1 @@
|
||||
0bc427ba863a2bd355b59629bd82281cc81e4d28
|
||||
fb8a718af86bdcb880606e67c30bd118e3efd174
|
||||
|
7
media/js/jquery.dataTables.js
vendored
7
media/js/jquery.dataTables.js
vendored
@ -2306,7 +2306,12 @@
|
||||
{
|
||||
// DataTables 1.9- compatibility
|
||||
oSettings.fnServerData.call( instance,
|
||||
oSettings.sAjaxSource, data, fn, oSettings
|
||||
oSettings.sAjaxSource,
|
||||
$.map( data, function (val, key) { // Need to convert back to 1.9 trad format
|
||||
return { name: key, value: val };
|
||||
} ),
|
||||
fn,
|
||||
oSettings
|
||||
);
|
||||
}
|
||||
else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
|
||||
|
Loading…
Reference in New Issue
Block a user