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
parent
f742b40921
commit
7d2926ce77
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue