TableRenderHook Action
Hi, I'm trying to add my button action to the table next to the filters. For some reason, the slideOver modal doesn't open and the action just disappears. How do I correctly add the hook for that action?
public function mount(): void
{
FilamentView::registerRenderHook(
TablesRenderHook::TOOLBAR_END,
function () {
return Blade::render('{{ $action }} <x-filament-actions::modals />', [
'action' => $this->getGraphAction()
]);
}
);
}
private function getGraphAction(): Action
{
return \Filament\Tables\Actions\Action::make('graphs')
->iconButton()
->icon('heroicon-o-chart-pie')
->iconSize(IconSize::Large)
->size(ActionSize::ExtraLarge)
->color('success')
->slideOver()
->modalContent(View::make('filament.widgets.tracker-graphs-widget'))
->modalHeading('')
->modalSubmitAction(false)
->modalCancelAction(false);
}public function mount(): void
{
FilamentView::registerRenderHook(
TablesRenderHook::TOOLBAR_END,
function () {
return Blade::render('{{ $action }} <x-filament-actions::modals />', [
'action' => $this->getGraphAction()
]);
}
);
}
private function getGraphAction(): Action
{
return \Filament\Tables\Actions\Action::make('graphs')
->iconButton()
->icon('heroicon-o-chart-pie')
->iconSize(IconSize::Large)
->size(ActionSize::ExtraLarge)
->color('success')
->slideOver()
->modalContent(View::make('filament.widgets.tracker-graphs-widget'))
->modalHeading('')
->modalSubmitAction(false)
->modalCancelAction(false);
}