Skip to content

Commit

Permalink
Prevent searching when query is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
csrui authored Jun 14, 2023
1 parent 41ad1ad commit 58ed1a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Http/Livewire/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ protected function getAction() : AbstractQuery
*/
public function search() : void
{
if (empty($this->query)) {
$this->resetSearch();
return;
}

$this->eligebleForPermission = $this->getAction()->search($this->query)->get();
$this->isSearching = true;
}
Expand Down

0 comments on commit 58ed1a7

Please sign in to comment.