diff --git a/src/Views/Columns/ButtonGroupColumn.php b/src/Views/Columns/ButtonGroupColumn.php index 8e1264d93..973e9b977 100644 --- a/src/Views/Columns/ButtonGroupColumn.php +++ b/src/Views/Columns/ButtonGroupColumn.php @@ -20,7 +20,9 @@ public function __construct(string $title, ?string $from = null) { parent::__construct($title, $from); - $this->label(fn () => null); + if (! isset($from)) { + $this->label(fn () => null); + } } public function getContents(Model $row): null|string|\Illuminate\Support\HtmlString|\Rappasoft\LaravelLivewireTables\Exceptions\DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View diff --git a/src/Views/Columns/ImageColumn.php b/src/Views/Columns/ImageColumn.php index f5d857324..a8bed5cc3 100644 --- a/src/Views/Columns/ImageColumn.php +++ b/src/Views/Columns/ImageColumn.php @@ -20,8 +20,10 @@ class ImageColumn extends Column public function __construct(string $title, ?string $from = null) { parent::__construct($title, $from); + if (! isset($from)) { + $this->label(fn () => null); + } - $this->label(fn () => null); } public function getContents(Model $row): null|string|\Illuminate\Support\HtmlString|DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View diff --git a/src/Views/Columns/LinkColumn.php b/src/Views/Columns/LinkColumn.php index 3302a1719..0edbc6436 100644 --- a/src/Views/Columns/LinkColumn.php +++ b/src/Views/Columns/LinkColumn.php @@ -22,7 +22,9 @@ public function __construct(string $title, ?string $from = null) { parent::__construct($title, $from); - $this->label(fn () => null); + if (! isset($from)) { + $this->label(fn () => null); + } } public function getContents(Model $row): null|string|\Illuminate\Support\HtmlString|DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View