Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/CheckboxColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-grid
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2019
* @version 3.3.0
* @version 3.3.1
*/

namespace kartik\grid;
Expand Down Expand Up @@ -99,13 +99,17 @@ public function init()
public function renderDataCell($model, $key, $index)
{
$options = $this->fetchContentOptions($model, $key, $index);

if ($this->rowHighlight) {
Html::addCssClass($options, 'kv-row-select');
}
$this->initPjax($this->_clientScript);
if ($this->attribute !== null) {
$this->name = Html::getInputName($model, "[{$index}]{$this->attribute}");
$this->checkboxOptions['value'] = Html::getAttributeValue($model, $this->attribute);

if (!$this->checkboxOptions instanceof Closure) {
$this->checkboxOptions['value'] = Html::getAttributeValue($model, $this->attribute);
}
}
return Html::tag('td', $this->renderDataCellContent($model, $key, $index), $options);
}
Expand Down