Skip to content

Commit 316521a

Browse files
author
Eugene Tupikov
committed
pass missed context params in ListRenderer
1 parent 5e21ab7 commit 316521a

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/renderers/ListRenderer.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,24 @@ public function renderCellContent($column, $index)
192192
{
193193
$id = $column->getElementId($index);
194194
$name = $column->getElementName($index);
195-
$input = $column->renderInput($name, [
196-
'id' => $id
195+
196+
/**
197+
* This class inherits iconMap from BaseRenderer
198+
* If the input to be rendered is a drag column, we give it the appropriate icon class
199+
* via the $options array
200+
*/
201+
$options = ['id' => $id];
202+
if (substr($id, -4) === 'drag') {
203+
$options = ArrayHelper::merge($options, ['class' => $this->iconMap['drag-handle']]);
204+
}
205+
206+
$input = $column->renderInput($name, $options, [
207+
'id' => $id,
208+
'name' => $name,
209+
'indexPlaceholder' => $this->getIndexPlaceholder(),
210+
'index' => $index,
211+
'columnIndex' => $columnIndex,
212+
'context' => $this->context,
197213
]);
198214

199215
if ($column->isHiddenInput()) {
@@ -240,7 +256,7 @@ public function renderCellContent($column, $index)
240256
}
241257

242258
$options = array_merge_recursive($options, $columnOptions);
243-
259+
244260
$content = Html::beginTag('div', $options);
245261

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

0 commit comments

Comments
 (0)