Skip to content

Commit d670db2

Browse files
authored
Added support for columOptions in ListRenderer
1 parent 9d2652b commit d670db2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/renderers/ListRenderer.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,14 @@ public function renderCellContent($column, $index)
233233
Html::addCssClass($options, 'form-group');
234234
}
235235

236+
if (is_callable($column->columnOptions)) {
237+
$columnOptions = call_user_func($column->columnOptions, $column->getModel(), $index, $this->context);
238+
} else {
239+
$columnOptions = $column->columnOptions;
240+
}
241+
242+
$options = array_merge_recursive($options, $columnOptions);
243+
236244
$content = Html::beginTag('div', $options);
237245

238246
if (empty($column->title)) {

0 commit comments

Comments
 (0)