F
Filament5mo ago
KeyMe

Livewire infolist component disappear on action/tab click

I displayed two livewire infolist component in a resource view page. The issue is when I click on any action button or relation manager tabs for example, the first component disappears. I've seen other posts tht explained its bcs im rendering more than one livewire comp. But I'm still not really sure on how to work it out for my case.
return $form
->schema([
Livewire::make(StatusFlow::class, ['order' => $form->getRecord()]) //disappears
->columnSpanFull(),
Tabs::make('Label')
->tabs([
Tabs\Tab::make('Order summary')
->schema([
Livewire::make(OrderInfoList::class, ['order' => $form->getRecord()]), //works fine
])
return $form
->schema([
Livewire::make(StatusFlow::class, ['order' => $form->getRecord()]) //disappears
->columnSpanFull(),
Tabs::make('Label')
->tabs([
Tabs\Tab::make('Order summary')
->schema([
Livewire::make(OrderInfoList::class, ['order' => $form->getRecord()]), //works fine
])
No description
3 Replies
KeyMe
KeyMe5mo ago
console shows this error: Uncaught Snapshot missing on Livewire component with id: n9AeaPH4TeFvDv9QdiiN
Hisham Elsayad
Hisham Elsayad3mo ago
Same issue did you figured out any solution ?
KeyMe
KeyMe3mo ago
somewhat, i ended up using alternative way of rendering livewire component for the first lw comp by calling the lw thru blade view, https://filamentphp.com/docs/3.x/infolists/adding-an-infolist-to-a-livewire-component, code:
ViewField::make('Status summary')->view('components.status-summary', ['order' => $form->getRecord()])
ViewField::make('Status summary')->view('components.status-summary', ['order' => $form->getRecord()])