Skip to content

Commit 5ddd0e6

Browse files
author
Eugene Tupikov
committed
Do not show action column when limit is equal to min
1 parent 9d87986 commit 5ddd0e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/renderers/TableRenderer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function renderHeader()
5555
$cells[] = $this->renderHeaderCell($column);
5656
}
5757

58-
if (is_null($this->limit) || $this->limit > 1) {
58+
if (is_null($this->limit) || ($this->limit >= 1 && $this->limit != $this->min)) {
5959
$button = $this->min == 0 || $this->addButtonPosition == self::POS_HEADER ? $this->renderAddButton() : '';
6060
$cells[] = Html::tag('th', $button, [
6161
'class' => 'list-cell__button'
@@ -142,7 +142,9 @@ private function renderRowContent($index = null, $item = null)
142142
}
143143
}
144144

145-
$cells[] = $this->renderActionColumn($index);
145+
if ($this->limit !== $this->min) {
146+
$cells[] = $this->renderActionColumn($index);
147+
}
146148

147149
if (!empty($hiddenInputs)) {
148150
$hiddenInputs = implode("\n", $hiddenInputs);

0 commit comments

Comments
 (0)