Open DMoneyEva opened 7 years ago
i do a temprorary fix by editing file /Util/Datatable.php
by adding:
$formattedData = [];
$fieldNames = $this->getFields();
foreach ($data as $value) {
$formattedRow = [];
$loopIndex = 0;
foreach ($fieldNames as $fieldKey => $fieldValue) {
$formattedRow[$fieldKey] = $value[$loopIndex];
$loopIndex += 1;
}
array_push($formattedData, $formattedRow);
}
$data = $formattedData;
inside execute()
function, in line after array_walk($data, function($val, $key) use ($id_index, &$ids)
This is how my records came out
{"draw":0,"recordsTotal":"1","recordsFiltered":"1","data":[["Hillary","Test",1]]}
What is causing this problem?