Skip to content

Commit

Permalink
Only apply primary url to primary columns
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Mar 11, 2021
1 parent b273d48 commit 516f6b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/tables/src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function primaryRecordAction($action)
{
$this->columns = collect($this->columns)
->map(function ($column) use ($action) {
if (! method_exists($column, 'action')) {
if (! $column->primary || ! method_exists($column, 'action')) {
return $column;
}

Expand All @@ -161,7 +161,7 @@ public function primaryRecordUrl($url)
{
$this->columns = collect($this->columns)
->map(function ($column) use ($url) {
if (! method_exists($column, 'url')) {
if (! $column->primary || ! method_exists($column, 'url')) {
return $column;
}

Expand Down

0 comments on commit 516f6b8

Please sign in to comment.