Skip to content

Commit ff3b2d5

Browse files
committed
Merge pull request #62 from ajibarra/master
Fixed issue where processing with autoData would stop after first useField = false column
2 parents f42a356 + ff8c09c commit ff3b2d5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Controller/Component/DataTableComponent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ public function paginate($name = null, $scope = array()) {
6767
foreach ($config->columns as $column => $options) {
6868
if (!$options['useField']) {
6969
$row[] = null;
70-
break;
70+
} else {
71+
$value = Hash::extract($result, $column);
72+
$row[] = $value ? $value[0] : null;
7173
}
72-
$value = Hash::extract($result, $column);
73-
$row[] = $value ? $value[0] : null;
7474
}
7575
$aaData[] = $row;
7676
}
@@ -209,4 +209,4 @@ protected function _getParams() {
209209
$property = $this->Controller->request->is('get') ? 'query' : 'data';
210210
return $this->Controller->request->$property;
211211
}
212-
}
212+
}

0 commit comments

Comments
 (0)