Datatable
Datatable copied to clipboard
[develop] can't use function names as callbacks
if you use a function name as a callback, it gets escaped as a string. Expected
$table->setCallbacks(['fnDraw'=>'myFnDraw']);
should generate:
{
fnDraw: myFnDraw
}
current
{
fnDraw: "myFnDraw"
}
this is because the options and the callback get merged and treated equally.
here:
https://github.com/Chumper/Datatable/blob/develop/src/Chumper/Datatable/Table.php#L299
and here:
https://github.com/Chumper/Datatable/blob/develop/src/Chumper/Datatable/Table.php#L372