Héctor Q. Torres
Héctor Q. Torres
FFilament
Created by Héctor Q. Torres on 3/27/2025 in #❓┊help
Target class [livewire] does not exist.
I have installed the Pest Livewire plugin according to the documentation:
https://pestphp.com/docs/plugins#livewire
I set up a TestCase, configuring the default user and panel.
I created the following simple test:
<?php

use App\Filament\App\Resources\ImportResource\Pages\ListImports;

use function Pest\Livewire\livewire;

it('can render the index page', function () {
livewire(ListImports::class)
->assertSuccessful();
});
<?php

use App\Filament\App\Resources\ImportResource\Pages\ListImports;

use function Pest\Livewire\livewire;

it('can render the index page', function () {
livewire(ListImports::class)
->assertSuccessful();
});
However, I receive the following error:
FAILED Tests\Feature\Filament\Resources\ImportResourceTest > it can render the index page
BindingResolutionException
Target class [livewire] does not exist.
FAILED Tests\Feature\Filament\Resources\ImportResourceTest > it can render the index page
BindingResolutionException
Target class [livewire] does not exist.
21 replies
FFilament
Created by Héctor Q. Torres on 3/24/2025 in #❓┊help
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([ ... ])
...
}
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))
...
];
}
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!
7 replies