F
Filament2w ago
emil

HeaderActions stops working with HasTable

class MyPage extends Page implements HasInfolists, HasForms, HasTable
{
use InteractsWithInfolists;
use InteractsWithForms;
use InteractsWithTable;

protected function getHeaderActions(): array
{
return [
\Filament\Actions\Action::make('test')
->slideOver(),
];
}
}
class MyPage extends Page implements HasInfolists, HasForms, HasTable
{
use InteractsWithInfolists;
use InteractsWithForms;
use InteractsWithTable;

protected function getHeaderActions(): array
{
return [
\Filament\Actions\Action::make('test')
->slideOver(),
];
}
}
The Table contract/trait causes the headerAction not to open a slideover. No console errors. Regular x-filament-panels::page. Any ideas, anyone?
9 Replies
emil
emilOP2w ago
Same issue if it just implements Hastable (no infolist/forms). Must be a bug, no? This was solved by adding this to the view. Please note that this is not required when it is not implementing HasTable. How that works I can't seem to figure out.
<x-filament-actions::modals/>
<x-filament-actions::modals/>
Hmm - no. While that initially worked, opening the slideOver stops working after a few state changed. Has been working flawlessly until I added a table on the page (which is unrelated to the action). Definitely some bug here but feel I can't gather enough detail to file a proper report.
awcodes
awcodes2w ago
Try removing forms and infolists. Page is already using them. Might be a conflict there.
emil
emilOP2w ago
@awcodes Good catch - unfortunately the same issue. Using this makes the slideOver work partially, but breaks after a few Livewire state changes. <x-filament-actions::modals/> If I, from that view, copy the view rendered for HasActions (the modal) and paste in my view, it all works perfectly. So it's some of the modal rendered from the view above that breaks it. And the fact that I have to include the view all together as soon as I use HasTable is strange..
awcodes
awcodes2w ago
It’s a custom page you have to give it a view. Can your share the code of your view?
emil
emilOP2w ago
<x-filament-panels::page>
{{ $this->form }}
<x-filament-actions::modals/>
</x-filament-panels::page>
<x-filament-panels::page>
{{ $this->form }}
<x-filament-actions::modals/>
</x-filament-panels::page>
I really want to make it clear: The slideover works WITHOUT x-filament-actions::modals if I do NOT use HasTable/InteractsWithTable So everything was working great, until I added implements HasTable - then slideOver stopped working - I had to add the modals view - and it breaks after a few Livewire state changes.
awcodes
awcodes2w ago
Hmm. Not seeing anything in the code that would conflict. What’s the output of php artisan filament:about
emil
emilOP2w ago
No description
awcodes
awcodes2w ago
Ok. That all looks ok to me. Is this a repo you can share?
emil
emilOP2w ago
Not really, but it should be easily re-producible. Or do you get slideOvers/modals working for HeaderActons on a page that implements a table?

Did you find this page helpful?