From dce2bd6e5065ab5402d9c4ec5ff550bfc5ad1ff4 Mon Sep 17 00:00:00 2001 From: Ovidiu U Date: Sun, 5 Apr 2026 20:50:18 +0100 Subject: [PATCH] feat: auto-reload results when fuel type, sort, or radius changes --- app/Livewire/Public/StationSearch.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/Livewire/Public/StationSearch.php b/app/Livewire/Public/StationSearch.php index e1966ce..a36f0bd 100644 --- a/app/Livewire/Public/StationSearch.php +++ b/app/Livewire/Public/StationSearch.php @@ -28,6 +28,27 @@ class StationSearch extends Component public ?string $apiError = null; + public function updatedFuelType(): void + { + if (! empty($this->meta)) { + $this->findStations(); + } + } + + public function updatedSort(): void + { + if (! empty($this->meta)) { + $this->findStations(); + } + } + + public function updatedRadius(): void + { + if (! empty($this->meta)) { + $this->findStations(); + } + } + public function findStations(): void { $this->validate();