We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isn't there a small bug in the construct callback function of the plugin:
public function __construct(string $name, array $args = []) { if (empty($args)) { $code = $name; } else { $code = 'function () { '; foreach ($args as $a) { $arg = json_encode($a); $code .= "Array.prototype.push.call(arguments, {$arg});"; } $code .= "return {$name}.apply(this, arguments); }"; } $this->setHash($code); }
Seems that this forces any callback function to use parameters, otherwise the construct just returns the hash of $name.
In my example I have a callback function that doesn't require any paranmters:
dt.render.foo = function (data, type, full, meta) { .... return foobar; } $columns[7]['render'] = $this->DataTables->callback('foo');
This will not call the callback function so I have to do something like this to force it to work:
$columns[7]['render'] = $this->DataTables->callback('foo', [false]);
Or did I mis-understand something about how this should work?
Thanks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Isn't there a small bug in the construct callback function of the plugin:
Seems that this forces any callback function to use parameters, otherwise the construct just returns the hash of $name.
In my example I have a callback function that doesn't require any paranmters:
This will not call the callback function so I have to do something like this to force it to work:
$columns[7]['render'] = $this->DataTables->callback('foo', [false]);
Or did I mis-understand something about how this should work?
Thanks.
The text was updated successfully, but these errors were encountered: