Refresh Filament component from a custom one

I have the following infolist
return $infolist->schema([
...
Section::make()
->schema([
Livewire::make(MyCustomComponent::class)
]),
]);
return $infolist->schema([
...
Section::make()
->schema([
Livewire::make(MyCustomComponent::class)
]),
]);
Is there a way to trigger the infolist to update from inside MyCustomComponent? I can listen for an event inside the my filament ViewRecord class, but I'm not sure how to trigger the actual update/refresh. I'd rather avoid a full page reload. Ideally, I would have the same behaviour actions have (eg only the infolist is updated)
3 Replies
Hisham Elsayad
Hisham Elsayad9mo ago
Did you figured out how ?
krekas
krekas9mo ago
Dispatch event from one component and listen for that event on another. Basic livewire
ChesterS
ChesterSOP9mo ago
What I needed was just to refresh the component, so I had this
#[On('some-event')]
class MyCustomComponent extends Component {}
#[On('some-event')]
class MyCustomComponent extends Component {}
This way the component is refreshed whenever some-event is dispatched
Want results from more Discord servers?
Add your server