Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

[develop] can't use function names as callbacks #338

Description

@Javier-Rotelli

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions