Skip to content

Commit 638cd17

Browse files
authored
Fix ActionColumn example by using RowActionCollection
The 'actions' option expects a RowActionCollection object rather than an array.
1 parent f1d07b4 commit 638cd17

File tree

1 file changed

+3
-2
lines changed
  • development/components/grid/columns-reference

1 file changed

+3
-2
lines changed

development/components/grid/columns-reference/action.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ For more info about possible actions see [Actions reference][actions-reference].
2222
use PrestaShop\PrestaShop\Core\Grid\Column\Type\Common\ActionColumn;
2323
use PrestaShop\PrestaShop\Core\Grid\Column\ColumnCollection;
2424
use PrestaShop\PrestaShop\Core\Grid\Action\Row\Type\LinkRowAction;
25+
use PrestaShop\PrestaShop\Core\Grid\Action\Row\RowActionCollection;
2526

2627
$actionColumn = new ActionColumn('actions');
2728
$actionColumn->setName('Actions');
2829
$actionColumn->setOptions([
29-
'actions' => [
30-
((new LinkRowAction('delete'))
30+
'actions' => (new RowActionCollection())
31+
->add((new LinkRowAction('delete'))
3132
->setIcon('delete')
3233
->setOptions([
3334
'route' => 'admin_custom_route',

0 commit comments

Comments
 (0)