Skip to content

Commit

Permalink
Fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
riasvdv committed Sep 26, 2024
1 parent 7c1eb37 commit 7838a35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/Livewire/RepositoriesComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ private function loadRepositories(bool $loadingMore = false): void
});
}

public function updatedSearch(): void
{
$this->repositories = collect();
$this->loadRepositories();
}

public function loadMore(): void
{
$this->loadRepositories(loadingMore: true);
Expand Down
2 changes: 1 addition & 1 deletion resources/views/front/livewire/repositories.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
type="search"
class="w-full form-input text-white bg-oss-black rounded-[12px] border-oss-gray-extra-dark placeholder-oss-gray py-4 px-6 h-[56px]"
placeholder="Find a package ..."
wire:model.live="search"
wire:model.debounce.live="search"
>
<svg class="w-4 h-4 absolute right-0 top-0 mt-4 mr-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="#EAE8E5" stroke-width="2" d="m15 15-4-4m-4 2A6 6 0 1 1 7 1a6 6 0 0 1 0 12Z"/></svg>
</div>
Expand Down

0 comments on commit 7838a35

Please sign in to comment.