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 Elsayad4mo ago
Did you figured out how ?
krekas
krekas4mo ago
Dispatch event from one component and listen for that event on another. Basic livewire
ChesterS
ChesterS4mo 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
More Posts
show 3 different widgets in single rowHow to display one stats widget and two custom widgets in one row?Target [Illuminate\Database\Eloquent\Model] is not instantiable On Nested Resources.i have `Trouble Ticket as root resource`, if i click on Analysis action, it could be redirect to `TiImage source not readable error while uploading file using Filament-Curator pluginI'm using Filament-curator version 3.4 and when i try to upload to s3 I'm getting the following erroTest EditUser livewire class gives 403**What I am trying to do:** I am trying to setup tests for the EditUser class in my app. I use Pest.Get the owner record while at their Edit PageWhat I am trying to do: I want to disable a field ('changing their role or changing their password')How do I correctly create a link to a record from another view?I has various pages within the app I am building where I am displaying a list of items based on dataHow can I ensure that only authorized people can see this Package in the Menu?https://github.com/filipfonal/filament-log-manager I'm trying to write a policy, but it didn't work How to refresh sub navigation badge using a livewire event?The navigation badge shows a count of how many items there are, however, when adding an item I cannocustom View component interaction to other componentHello, i made a View component for a form inside an action, inside this component is a scanner usingdashboard filtersForm() not showing upMy dashboard extends `Filament\Pages\Dashboard`, on that dashboard page i have the `Filament\Pages\D