F
Filament3y ago
mcdc

Multiple headerActions on export plugins

It will be good idea to have fully custom multiple header action, i dont know if its already there, but I tried its not working use AlperenErsoy\FilamentExport\Actions\FilamentExportHeaderAction; ->headerActions([ FilamentExportHeaderAction::make('Export')->defaultFormat('pdf')->label('Export PDF'), FilamentExportHeaderAction::make('Export')->defaultFormat('xlsx')->label('Export Excel'), FilamentExportHeaderAction::make('Export')->defaultFormat('csv')->label('Export CSV') ]) https://github.com/alperenersoy/filament-export/issues/66
GitHub
Multiple headerActions · Issue #66 · alperenersoy/filament-export
It will be good idea to have fully custom multiple header action, i dont know if its already there, but I tried its not working use AlperenErsoy\FilamentExport\Actions\FilamentExportHeaderAction; -...
21 Replies
toeknee
toeknee3y ago
I am confused, are you saying the parameters are not working under the ExportHeaderAction as per: https://github.com/alperenersoy/filament-export#header-action
GitHub
GitHub - alperenersoy/filament-export: Customizable export and prin...
Customizable export and print functionality for Filament Admin Panel - GitHub - alperenersoy/filament-export: Customizable export and print functionality for Filament Admin Panel
Dan Harrin
Dan Harrin3y ago
actions need a unique name you can customise the label each time with label() but the names need to be unique
mcdc
mcdcOP3y ago
It is working, but the ability to have multiple FilamentExportHeaderAction::make('Export')->defaultFormat('xlsx')->label('Export Excel'), with different default format does not, I think the developer for this plugins is considering this as an enhancement
mcdc
mcdcOP3y ago
Thanks for pointing it out @Dan Harrin , @alperenersoy is considering this an enhancement
toeknee
toeknee3y ago
IF you change 'Export' to 'ExportCSV' and so on I believe it might work
mcdc
mcdcOP3y ago
I might try this out
toeknee
toeknee3y ago
Then ExportXlsx and so on
mcdc
mcdcOP3y ago
Thanks ill try this now Hi @toeknee_iom I do have another question you wont mind if ill just post it here?
toeknee
toeknee3y ago
Feel free to ask
mcdc
mcdcOP3y ago
I use this environment-indicator FilamentEnvironmentIndicator::configureUsing(function (FilamentEnvironmentIndicator $indicator) { $indicator->showBadge = fn () => false; $indicator->showBorder = fn () => true; }, isImportant: true); I dont know whats the provider I use for this on my AppServiceProvider
mcdc
mcdcOP3y ago
I already open an issue for this Missing Documentation https://github.com/pxlrbt/filament-environment-indicator/issues/7
GitHub
Missing documentation · Issue #7 · pxlrbt/filament-environment-indi...
I tried to use it on my AppServiceProvider FilamentEnvironmentIndicator::configureUsing(function (FilamentEnvironmentIndicator $indicator) { $indicator->showBadge = fn () => false; $indicator...
toeknee
toeknee3y ago
1 second it should be fairly simple What do you mean provider? I just installed it without issue?
mcdc
mcdcOP3y ago
GitHub
GitHub - pxlrbt/filament-environment-indicator: Never confuse your ...
Never confuse your tabs with different Filament environments again. - GitHub - pxlrbt/filament-environment-indicator: Never confuse your tabs with different Filament environments again.
toeknee
toeknee3y ago
You mean to customise per environment? OR do you mean with class to reference
mcdc
mcdcOP3y ago
I mean something like this I cant use FilamentEnvironmentIndicator and its need to have something like use Filament\Facades\Filament; (sorry im just trying to learn not really familiar of the terminology)
toeknee
toeknee3y ago
Your IDE should tell you which class to import
mcdc
mcdcOP3y ago
oh no ill try to check it out, or i might have miss something, I use sublime (as vscode is heavy on my device)
toeknee
toeknee3y ago
use pxlrbt\FilamentEnvironmentIndicator\FilamentEnvironmentIndicator;
mcdc
mcdcOP3y ago
thanks this what i need!! my IDE dosent notify it
toeknee
toeknee3y ago
You need to look for IntelliSense for IDE's, we mainly use phpStorm here.
mcdc
mcdcOP3y ago
Thanks this one also work!

Did you find this page helpful?