From a8637326d3df5fa9f8116490365d87179d957825 Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:30:16 +0000 Subject: [PATCH 1/2] Link column fix (#2223) (#2224) * Link column fix (#2223) * Add handling for From field for "LinkColumn" * Update ChangeLog --- CHANGELOG.md | 4 ++++ src/Views/Columns/LinkColumn.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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/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 From fe9298483d5964b25c572e43ac94f105cbea2bf6 Mon Sep 17 00:00:00 2001 From: kvovadis <60597760+kvovadis@users.noreply.github.com> Date: Sun, 20 Apr 2025 03:00:11 +0200 Subject: [PATCH 2/2] Vue compatibility fix x-cloak Update TableAttributeHelpers.php --- src/Traits/Helpers/TableAttributeHelpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)',