Skip to content

data as array are forbidden #90

@xJuvi

Description

@xJuvi

In some cases it's useful to define a single dataset as array, f.e. if you want to order by an id bis display a human readeble name.

One example which i tried with server-side rendering is here:
https://datatables.net/manual/data/orthogonal-data#Predefined-values

Is it possible to change it' I first look into the source code i think there are much changes required. If i try to define data as array i get an exception:

Fatal error: Uncaught TypeError: Return value of Ozdemir\Datatables\Column::value() must be of the type string, array returned in /var/www/vhosts/httpdocs/wwwroot/vendor/ozdemir/datatables/src/Column.php:75 Stack trace: #0 /var/www/vhosts/httpdocs/wwwroot/vendor/ozdemir/datatables/src/Datatables.php(219): Ozdemir\Datatables\Column->value(Array) #1 [internal function]: Ozdemir\Datatables\Datatables->Ozdemir\Datatables\{closure}(Object(Ozdemir\Datatables\Column)) #2 /var/www/vhosts/httpdocs/wwwroot/vendor/ozdemir/datatables/src/Datatables.php(220): array_map(Object(Closure), Array) #3 [internal function]: Ozdemir\Datatables\Datatables->prepareRowData(Array) #4 /var/www/vhosts/httpdocs/wwwroot/vendor/ozdemir/datatables/src/Datatables.php(207): array_map(Array, Array) #5 /var/www/vhosts/httpdocs/wwwroot in /var/www/vhosts/httpdocs/wwwroot/vendor/ozdemir/datatables/src/Column.php on line 75

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