Skip to content

Commit a984f38

Browse files
committed
Fix empty message pb (mergeRow)
1 parent 34d65dc commit a984f38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Ajax/semantic/widgets/datatable/DataTable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* DataTable widget for displaying list of objects
2121
*
22-
* @version 1.1.2
22+
* @version 1.1.3
2323
* @author jc
2424
* @since 2.2
2525
*
@@ -242,7 +242,7 @@ protected function _generateContent($table) {
242242
}
243243
if ($table->getRowCount() == 0) {
244244
$result = $table->addRow();
245-
$result->mergeRow();
245+
$result->mergeCol();
246246
$result->setValues([
247247
$this->_emptyMessage
248248
]);
@@ -258,7 +258,7 @@ protected function _generateGroupByRow($index, $gbField, $table, $fields, &$acti
258258
$uuid = uniqid("grp");
259259
$uuids[$gbField] = $uuid;
260260
$id = $this->_instanceViewer->getIdentifier();
261-
$result = $table->addMergeRow(sizeof($fields) + 1, $newValue);
261+
$result = $table->addMergeRow(\count($fields) + 1, $newValue);
262262
$result->setIdentifier($this->identifier . "-tr-gb-" . $id);
263263
$result->setProperty("data-ajax", $id);
264264
$result->setProperty("data-group", $uuid);
@@ -420,7 +420,7 @@ public function afterCompile($index, $callback) {
420420
private function addToolbarRow($part, $table, $captions) {
421421
$hasPart = $table->hasPart($part);
422422
if ($hasPart) {
423-
$row = $table->getPart($part)->addRow(\sizeof($captions));
423+
$row = $table->getPart($part)->addRow(\count($captions));
424424
} else {
425425
$row = $table->getPart($part)->getRow(0);
426426
}

0 commit comments

Comments
 (0)