From 1cb6d594d03abb485405d0dd6d7e8972d8810a76 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 23 Nov 2023 11:49:49 +0100 Subject: [PATCH] Fix service loading issue in project select page --- app/Http/Livewire/Project/New/Select.php | 5 +++-- resources/views/livewire/project/new/select.blade.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Http/Livewire/Project/New/Select.php b/app/Http/Livewire/Project/New/Select.php index 934afd9df..13fbb8886 100644 --- a/app/Http/Livewire/Project/New/Select.php +++ b/app/Http/Livewire/Project/New/Select.php @@ -47,6 +47,7 @@ class Select extends Component } public function render() { + if ($this->search) $this->loadServices(); return view('livewire.project.new.select'); } @@ -68,10 +69,10 @@ class Select extends Component // } // } - public function loadServices(bool $force = false) + public function loadServices() { try { - if (count($this->allServices) > 0 && !$force) { + if (count($this->allServices) > 0) { if (!$this->search) { $this->services = $this->allServices; return; diff --git a/resources/views/livewire/project/new/select.blade.php b/resources/views/livewire/project/new/select.blade.php index 9ffa76e74..60da34cd1 100644 --- a/resources/views/livewire/project/new/select.blade.php +++ b/resources/views/livewire/project/new/select.blade.php @@ -145,9 +145,9 @@ --}} -
+

Services

- Reload Services List + Reload Services List