How to Disable Table Polling in a Header Action on a Resource List Page?

I'm working with Filament and trying to disable polling for a resource table when a header action is triggered. However, my approach doesn't seem to work.

Here’s my setup:

In MyResource, I define the table with polling enabled:

public static function table(Table $table): Table
{
    return $table
        ->defaultSort('created_at', 'desc')
        ->poll('5s')
        ->columns([ ... ])
        ...
}


In MyResourceListPage, I try to disable polling within a header action:

protected function getHeaderActions(): array
{
    return [
        Action::make('create')
            ->mountUsing(fn() => $this->table->poll(null))
            ...
    ];
}


However, this doesn't seem to stop the polling when the action is executed.

Is there a correct way to dynamically disable table polling within an action? Would appreciate any insights!
Was this page helpful?