Fix service loading issue in project select page
This commit is contained in:
parent
16261fc36e
commit
1cb6d594d0
@ -47,6 +47,7 @@ class Select extends Component
|
|||||||
}
|
}
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
if ($this->search) $this->loadServices();
|
||||||
return view('livewire.project.new.select');
|
return view('livewire.project.new.select');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,10 +69,10 @@ class Select extends Component
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public function loadServices(bool $force = false)
|
public function loadServices()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (count($this->allServices) > 0 && !$force) {
|
if (count($this->allServices) > 0) {
|
||||||
if (!$this->search) {
|
if (!$this->search) {
|
||||||
$this->services = $this->allServices;
|
$this->services = $this->allServices;
|
||||||
return;
|
return;
|
||||||
|
@ -145,9 +145,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> --}}
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2" wire:init='loadServices(true)'>
|
<div class="flex items-center gap-2" wire:init='loadServices'>
|
||||||
<h2 class="py-4">Services</h2>
|
<h2 class="py-4">Services</h2>
|
||||||
<x-forms.button wire:click='loadServices(true)'>Reload Services List</x-forms.button>
|
<x-forms.button wire:click='loadServices'>Reload Services List</x-forms.button>
|
||||||
<input
|
<input
|
||||||
class="w-full text-white rounded input input-sm bg-coolgray-200 disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50"
|
class="w-full text-white rounded input input-sm bg-coolgray-200 disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50"
|
||||||
wire:model.debounce.200ms="search" placeholder="Search..."></input>
|
wire:model.debounce.200ms="search" placeholder="Search..."></input>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user