Skip to content

Commit

Permalink
Add gridDropButtonOptions option for type=array columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Eremin Michael committed Aug 28, 2018
1 parent 20962e4 commit 28302ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/Crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ public function guessColumns($fields = null)

if (ArrayHelper::getValue($schema, 'gridDropButton', false)) {
$dropList = ArrayHelper::getValue($schema, 'gridDropButtonList', $itemList);
$columns[$key] = [
$dropOptions = ArrayHelper::getValue($schema, 'gridDropButtonOptions', []);
$columns[$key] = ArrayHelper::merge([
'class' => DropDownButtonColumn::class,
'attribute' => $field,
'filter' => $itemList,
Expand All @@ -456,7 +457,7 @@ public function guessColumns($fields = null)
}
return $items;
},
];
], $dropOptions);
} else {
$columns[$key] = [
'attribute' => $field,
Expand Down

0 comments on commit 28302ba

Please sign in to comment.