vudaltsov - DataTables 1.10 issue
vudaltsov - DataTables 1.10 issue
Reposted from the 1.10.0-beta.1 announcement thread.
here's a link to a strange, but simple example with 1.9.4: http://vudaltsov.ru/dataTable/dataTablesTest.php?ver=1.9.4
the same code with 1.10.0 files:
http://vudaltsov.ru/dataTable/dataTablesTest.php?ver=1.10.0
here's a link to a strange, but simple example with 1.9.4: http://vudaltsov.ru/dataTable/dataTablesTest.php?ver=1.9.4
the same code with 1.10.0 files:
http://vudaltsov.ru/dataTable/dataTablesTest.php?ver=1.10.0
This discussion has been closed.
Replies
I will repeat the problem here:
It seems that 'mData': function (source, type, val) { ... } gives an empty val inside the function. Same code works great on 1.9.4 (visit the links from the post above)
So the problem here is that in 1.10 we need to do a get on the data before we can set it! It is the get that is failing at the moment.
This is a relatively simple fix in your code, just add a chance for `! type` and if that is true, then return the entire data source:
[code]
if (type === 'set')
{
var col = val.split('|');
source.int = col[0];
source.sel = col[1];
return
}
else if (type === 'display') return source.sel;
else if (!type) return source;
return source.int;
[/code]
Unfortunately, I don't think this is something I can really fix to make it work like 1.9- since 1.9 was actually incorrect in this regard... Its a bug fix basically.
Allan