Closed VladimirBarabash closed 2 years ago
master
kartik\grid\GridView
kartik\grid\ExpandRowColumn
contentOptions
echo kartik\grid\GridView::widget([ ... 'columns' => [ [ 'class' => 'kartik\grid\ExpandRowColumn', 'value' => function ($model, $key, $index, $column) { return GridView::ROW_COLLAPSED; }, 'detailUrl' => Url::to(['/update']), 'contentOptions' => function ($model, $key, $index, $widget) { return $model->isHighlighted ? ['class' => 'highlighted'] : []; }, ], ... ], ]);
When I follow those steps, I see "Error. Cannot use object of type Closure as array":
I was expecting no error message, Closure in contentOptions working for ExpandRowColumn like in version 3.2.8
ExpandRowColumn
There is no bug in version 3.2.8. There is bug in versions 3.2.9-3.3.5, dev-master
Prerequisites
master
branch of yii2-grid.Steps to reproduce the issue
kartik\grid\GridView
withkartik\grid\ExpandRowColumn
with Closure incontentOptions
:Expected behavior and actual behavior
When I follow those steps, I see "Error. Cannot use object of type Closure as array":
I was expecting no error message, Closure in
contentOptions
working forExpandRowColumn
like in version 3.2.8Environment
Browsers
Operating System
Libraries
Isolating the problem
There is no bug in version 3.2.8. There is bug in versions 3.2.9-3.3.5, dev-master