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 28efa5a043bda5e77e07eac59c5bc90f18d50567 Mon Sep 17 00:00:00 2001 From: G4Zz0L1 Date: Wed, 5 Mar 2025 00:59:25 +0100 Subject: [PATCH 2/2] Update IsNumericFilter.php Fixes issues 2229 --- src/Views/Filters/Traits/IsNumericFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Filters/Traits/IsNumericFilter.php b/src/Views/Filters/Traits/IsNumericFilter.php index 0d613b50b..cc138a3b8 100644 --- a/src/Views/Filters/Traits/IsNumericFilter.php +++ b/src/Views/Filters/Traits/IsNumericFilter.php @@ -6,7 +6,7 @@ trait IsNumericFilter { public function isEmpty(float|int|string|array|null $value): bool { - return ! is_null($value) ? ($this->validate($value) == false) : true; + return ! is_null($value) ? ($this->validate($value) === false) : true; } /**