Skip to content

Commit a94c6ed

Browse files
authored
Add handling for From field for "LinkColumn"
1 parent a99b5b3 commit a94c6ed

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Views/Columns/LinkColumn.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ class LinkColumn extends Column
2121
public function __construct(string $title, ?string $from = null)
2222
{
2323
parent::__construct($title, $from);
24-
25-
$this->label(fn () => null);
24+
25+
if (! isset($from)) {
26+
$this->label(fn () => null);
27+
}
2628
}
2729

30+
2831
public function getContents(Model $row): null|string|\Illuminate\Support\HtmlString|DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
2932
{
3033
if (! $this->hasTitleCallback()) {

0 commit comments

Comments
 (0)