Insert import and export button here!

Hey guys, is there a hook position that allows me to insert 2 import and export buttons next to the create button? or failing that next to the table search button! I have added the import and export buttons in another module, but I stay above the search and to my taste it looks a bit ugly, I would like to see the option to place them next to create or search...
No description
No description
6 Replies
nanopanda
nanopanda2mo ago
@TranceCode If I'm understanding you correctly, you can try the getHeaderActions() method in your ListRecords class. I put my export/import in an ActionGroup to the right of the create button, but YMMV. protected function getHeaderActions(): array { return [ Actions\CreateAction::make(), Actions\ActionGroup::make([ ExportAction::make()
No description
TranceCode
TranceCodeOP2mo ago
Thank you bro, i will check this option!
Mokatchi
Mokatchi2w ago
Can you please tell me how you did it to add the the icon to the export btn and how you customized its name???
nanopanda
nanopanda2w ago
@Mokatchi Icon is just from the action config, like: ExportAction::make()->icon('heroicon-o-document-arrow-down') The name is automatically added based on the $model static var from the Exporter class, but you can override that with ->label() config as well
Mokatchi
Mokatchi2w ago
Thank you for the answer, it's exactly what I did, but I couldn't change the btn color 😅
awcodes
awcodes2w ago
->color() should work as long as it’s a color registered with filament.
Want results from more Discord servers?
Add your server