Skip to content

Commit

Permalink
Fix empty message pb (mergeRow)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheron committed Jul 17, 2021
1 parent 34d65dc commit a984f38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Ajax/semantic/widgets/datatable/DataTable.php
Expand Up @@ -19,7 +19,7 @@
/**
* DataTable widget for displaying list of objects
*
* @version 1.1.2
* @version 1.1.3
* @author jc
* @since 2.2
*
Expand Down Expand Up @@ -242,7 +242,7 @@ protected function _generateContent($table) {
}
if ($table->getRowCount() == 0) {
$result = $table->addRow();
$result->mergeRow();
$result->mergeCol();
$result->setValues([
$this->_emptyMessage
]);
Expand All @@ -258,7 +258,7 @@ protected function _generateGroupByRow($index, $gbField, $table, $fields, &$acti
$uuid = uniqid("grp");
$uuids[$gbField] = $uuid;
$id = $this->_instanceViewer->getIdentifier();
$result = $table->addMergeRow(sizeof($fields) + 1, $newValue);
$result = $table->addMergeRow(\count($fields) + 1, $newValue);
$result->setIdentifier($this->identifier . "-tr-gb-" . $id);
$result->setProperty("data-ajax", $id);
$result->setProperty("data-group", $uuid);
Expand Down Expand Up @@ -420,7 +420,7 @@ public function afterCompile($index, $callback) {
private function addToolbarRow($part, $table, $captions) {
$hasPart = $table->hasPart($part);
if ($hasPart) {
$row = $table->getPart($part)->addRow(\sizeof($captions));
$row = $table->getPart($part)->addRow(\count($captions));
} else {
$row = $table->getPart($part)->getRow(0);
}
Expand Down

0 comments on commit a984f38

Please sign in to comment.