Skip to content

Commit

Permalink
Revome override buttons in ActionColumn::class (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-rodigy authored Aug 20, 2023
1 parent 9d44f77 commit 90895a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Column/ActionColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ protected function renderDataCellContent(array|object $data, mixed $key, int $in
return parent::renderDataCellContent($data, $key, $index);
}

if (empty($this->buttons)) {
$this->buttons = $this->createDefaultButtons()->buttons;
}

return PHP_EOL . preg_replace_callback(
'/{([\w\-\/]+)}/',
function (array $matches) use ($data, $key, $index): string {
Expand Down
1 change: 0 additions & 1 deletion src/GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ private function renderColumns(): array

if ($column instanceof ActionColumn) {
$column = $column
->createDefaultButtons()
->currentRoute($this->currentRoute)
->urlGenerator($this->getUrlGenerator());
}
Expand Down

0 comments on commit 90895a9

Please sign in to comment.