SearchPanes Editor PHP ServerSide bug with label Array param ?
SearchPanes Editor PHP ServerSide bug with label Array param ?
Hi,
I am using DataTables Editor PHP 2.2.0. When I utilize the label function of SearchPaneOptions with an array, the JSON result always returns a string with the first element of the array, as if I used the function with only a string.
For Example :
->searchPaneOptions( SearchPaneOptions::inst()
->table('cours')
->value('inscription_id')
->label(['inscription.prenom_eleve', 'inscription.nom_eleve', 'inscription.instrument'])
->where(function ($q) use ($prof_id) {
$q->where('cours.professeur_id', $prof_id, '=');
})
->leftJoin('inscription', 'inscription.id_inscription', '=', 'cours.inscription_id')
/->render(function ($row) {
return $row['inscription.prenom_eleve'].' '.$row['inscription.nom_eleve'].' ('.$row['inscription.instrument'].')';
})/
)
In this example, I commented out the render function because the result is not an array, but a string with the first element of the array label (inscription.prenom_eleve).
Is this a bug or am I misunderstanding something?
Thx