fix(bio): prevent page scroll-jump on slug check (#[Renderless])

.checkSlug() triggered Livewire re-render on every keystroke,
causing the editor to scroll to top. #[Renderless] skips re-render
while still returning the bool result to Alpine.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-05-17 23:30:55 +02:00
parent f742b40921
commit 7d2926ce77
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ namespace App\Livewire\Pages\Bio;
use App\Domains\Bio\Models\BioBlock;
use App\Domains\Bio\Models\BioPage;
use Illuminate\View\View;
use Livewire\Attributes\Renderless;
use Livewire\Component;
class Edit extends Component
@ -90,6 +91,7 @@ class Edit extends Component
$this->dispatch('toast', message: 'Gespeichert', type: 'success');
}
#[Renderless]
public function checkSlug(string $slug): bool
{
$page = BioPage::findOrFail($this->pageId);