F
Filament13mo ago
Matthew

How can I make table "live"?

Instead of using polling interval, as soon as an entry is added to the table, the table refreshes. As it is right now, I have a widget that is part of a page. The widget has an action, and when its executed it will add some entries to the table. However, we cant see that until we refresh the page. Is there a way to make the change visible instantly?
1 Reply
Matthew
MatthewOP13mo ago
I got to this part. Widget
$this->dispatch('song_saved', message: true);
$this->dispatch('song_saved', message: true);
Page class
#[On('post_saved')]
public function updatePostList($message)
{
if ($message) {
// We need to refresh the table
}
}

public function table(Table $table): Table
{
return $table
// ...
}
#[On('post_saved')]
public function updatePostList($message)
{
if ($message) {
// We need to refresh the table
}
}

public function table(Table $table): Table
{
return $table
// ...
}
Want results from more Discord servers?
Add your server