© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
1 reply
SuperUserDo

Issue with Filament modal, Livewire And Lazy Load

Hi,

I had lazy loaded disabled and i am getting issue that i am unable to lazy load component even tho i did use ->with(), i think it is up to Livewire so tought to ask here if someone had similar issue?

<?php

namespace App\Livewire;

use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Livewire\Attributes\Lazy;
use Livewire\Component;

#[Lazy]
class Guide extends Component
{
    public $guides;

    public function mount ()
    {
        $this->guides = \App\Models\Guide::query()->with(['parent', 'children',])->get();
    }

    public function render()
    {
        return view('livewire.guide');
    }

    public function openModal($userId = null): void
    {
        $user = $userId
            ? User::findOrFail($userId)
            : Auth::user();


        $this->userData = $user->toArray();
        $this->dispatch('open-modal', id: 'guide-modal');
    }
}
<?php

namespace App\Livewire;

use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Livewire\Attributes\Lazy;
use Livewire\Component;

#[Lazy]
class Guide extends Component
{
    public $guides;

    public function mount ()
    {
        $this->guides = \App\Models\Guide::query()->with(['parent', 'children',])->get();
    }

    public function render()
    {
        return view('livewire.guide');
    }

    public function openModal($userId = null): void
    {
        $user = $userId
            ? User::findOrFail($userId)
            : Auth::user();


        $this->userData = $user->toArray();
        $this->dispatch('open-modal', id: 'guide-modal');
    }
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Lazy load and livewire refresh with tables
FilamentFFilament / ❓┊help
2y ago
Issue with Filament Action Modal inside Livewire WireModal
FilamentFFilament / ❓┊help
8mo ago
Filament table in Modal - livewire component
FilamentFFilament / ❓┊help
2y ago
Filament Table + Livewire UI Custom Modal
FilamentFFilament / ❓┊help
3y ago