F
Filament14mo ago
Masea

multiple tables in the same livewire component

Pretty much like multiple forms feature, is there a way to do it with tables?
Solution:
I'm not entirely sure about it, I think because the table is more complex than forms. (Infact table uses forms for filters)
Jump to solution
5 Replies
Arko
Arko14mo ago
I've done it by adding the extra tables as footer widgets, which I made full width. E.g.:
class ListProjects extends ListRecords
{
protected static string $resource = ProjectResource::class;

protected function getFooterWidgets(): array
{
return [
ProjectResource\Widgets\ProjectsInDevelopment::class,
ProjectResource\Widgets\ProjectsPlanned::class,
];
}
}
class ListProjects extends ListRecords
{
protected static string $resource = ProjectResource::class;

protected function getFooterWidgets(): array
{
return [
ProjectResource\Widgets\ProjectsInDevelopment::class,
ProjectResource\Widgets\ProjectsPlanned::class,
];
}
}
Masea
MaseaOP14mo ago
@Arko thanks for your solution. Although i am planning to do it outside the panel, using a custom livewire component
ZedoX
ZedoX14mo ago
1 table per livewire component You can have multiple livewire components with a table on a single page
Masea
MaseaOP14mo ago
@ZedoX just curious. why is that though? because we can have multiple forms. Yeah do know that but it would be nice to have a function to keep multiple tables in the same class
Solution
ZedoX
ZedoX14mo ago
I'm not entirely sure about it, I think because the table is more complex than forms. (Infact table uses forms for filters)
Want results from more Discord servers?
Add your server