How to implement Create New Record in Table builder?

I would like to show table in frontend using Table and Form Builder. It is implemented in Admin panel where is button called New Record in the header of the page and is connected to Table Edit form and the Resource table itself. Can not figure it out how to do it. Have not found any examples in doc or here. Any help will be appreciated.
3 Replies
ZedoX
ZedoX2y ago
You can use a table header action.
protected function getTableHeaderActions(): array
{
return [
\Filament\Tables\Actions\CreateAction::make()
];
}
protected function getTableHeaderActions(): array
{
return [
\Filament\Tables\Actions\CreateAction::make()
];
}
While it's not the same as a page action, i believe u can achieve the functionality you are looking for by using a table header action
Gaspar
GasparOP2y ago
Yes, indeed. I can use it that way. Thank you very much! Now i have weird UI situation where i have both table header and filter / search area. Is there possibility to combine them together?
ZedoX
ZedoX2y ago
unfornately no, you could try to make more compact using custom CSS
Want results from more Discord servers?
Add your server