3.2 Exporting CSV

Just upgraded to 3.2 so I can use the export action but hitting a wall when trying to add the ExportAction to getHeaderActions, it seems to work just fine in the table, but it just doesn't work in the header?

protected function getHeaderActions(): array { return [ Actions\CreateAction::make(), ImportAction::make() ->importer(ProductImporter::class), ExportAction::make() ->exporter(ProductExporter::class) ]; }

Removing ImportAction and leaving just Export still does the same thing.
Header actions must be an instance of Filament\Actions\Action, or Filament\Actions\ActionGroup.
Solution
You need to read docs clearly, everything is written here.. Outside table you use use Filament\Actions\ExportAction; and inside table you use use Filament\Tables\Actions\ExportAction; Notice the difference
Screenshot_from_2024-01-19_16-13-36.png
Was this page helpful?