diff --git a/src/Table.php b/src/Table.php index 9e7ff5e4b0..76251f2545 100644 --- a/src/Table.php +++ b/src/Table.php @@ -427,6 +427,7 @@ protected function renderView(): void // add totals rows or empty message if ($this->_renderedRowsCount === 0) { if (!$this->jsPaginator || !$this->jsPaginator->getPage()) { + $this->tEmpty->set('columns', (string) count($this->columns)); $this->template->dangerouslyAppendHtml('Body', $this->tEmpty->renderToHtml()); } } elseif ($this->totalsPlan) {