diff --git a/CHANGELOG.md b/CHANGELOG.md index dc56fe69d..b30c7d9f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `laravel-livewire-tables` will be documented in this file +## [v3.7.1] - 2025-02-28 +### Bug Fixes +- Ensure that LinkColumn is included in query if "from" is defined + ## [v3.7.0] - 2025-02-27 ### Bug Fixes diff --git a/src/Traits/Helpers/TableAttributeHelpers.php b/src/Traits/Helpers/TableAttributeHelpers.php index 36971ab3e..e9a2e269b 100644 --- a/src/Traits/Helpers/TableAttributeHelpers.php +++ b/src/Traits/Helpers/TableAttributeHelpers.php @@ -131,7 +131,7 @@ public function getTopLevelAttributesArray(): array return [ 'x-data' => 'laravellivewiretable($wire)', 'x-init' => "setTableId('".$this->getTableAttributes()['id']."'); setAlpineBulkActions('".$this->showBulkActionsDropdownAlpine()."'); setPrimaryKeyName('".$this->getPrimaryKey()."');", - 'x-cloak', + 'x-cloak' => '', 'x-show' => 'shouldBeDisplayed', 'x-on:show-table.window' => 'showTable(event)', 'x-on:hide-table.window' => 'hideTable(event)', diff --git a/src/Views/Columns/LinkColumn.php b/src/Views/Columns/LinkColumn.php index 2c024e391..bc5a6f960 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