Skip to content

Commit cefe378

Browse files
authored
Merge pull request #21 from kotchuprik/issue-12
Better handling disabled pagination, fix issue #12
2 parents cd3e5a9 + a6fb4f7 commit cefe378

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

grid/Column.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ public function init()
2727

2828
protected function renderDataCellContent($model, $key, $index)
2929
{
30-
$offset = $this->grid->dataProvider->pagination->pageSize * $this->grid->dataProvider->pagination->page;
30+
$offset = 0;
31+
32+
if ($this->grid->dataProvider->pagination) {
33+
$offset = $this->grid->dataProvider->pagination->pageSize * $this->grid->dataProvider->pagination->page;
34+
}
35+
3136
return Html::tag('div', '☰', [
3237
'class' => 'sortable-widget-handler',
3338
'data-id' => $model->getPrimaryKey(),

0 commit comments

Comments
 (0)