custom modal content

I make a filament page and implement HasTable,
i want to make action view with modal and use custom modal content, but the modal not show up and no error,
public function table(Table $table): Table
    {
        return $table
            ->actions([
                ActionsAction::make('view')
    ->modalContent(view('filament.pages.actions.detail-profit-and-loss'))
            ])
}


but if use

protected function getHeaderActions(): array
    {
        return [
            Action::make('view')
                ->modalContent(
                    fn(): View => view('filament.pages.actions.detail-profit-and-loss', [
                        'record' => '',
                    ])
                )
        ];
    }

its work, but that not what i want, i want to add action on the table
Was this page helpful?