feat: auto-reload results when fuel type, sort, or radius changes
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user