Krzysztof
Krzysztof
FFilament
Created by Krzysztof on 10/13/2024 in #❓┊help
ViewAction slideOver render hook
Is it possible to inject a view using render hooks to the ViewAction on a table? I need to globally (hence render hook) inject a view to all slide overs from a plugin
2 replies
FFilament
Created by Krzysztof on 10/7/2024 in #❓┊help
Custom FileUpload
Is it possible to "fake" the underlying file for FileUpload field? I am connecting with external API and get the file in base64 format. I am saving the file to the temporary disk so I think I should be able to provide the path to the file no problem. I've found getUploadedFileUsing method on FileUpload but it does not seem to fire. Has anyone tried something similar?
3 replies
FFilament
Created by Krzysztof on 8/18/2024 in #❓┊help
Testing formActions
I have a following footer actions:

->footerActions([
fn (string $operation): Action => Action::make('saveBasicDetails')
->label('Save changes')
->action(function (Section $component, EditRecord $livewire) {
$livewire->saveFormComponentOnly($component);

Notification::make()
->title('Basic details saved')
->success()
->send();
})
->visible($operation == 'edit'),
])

->footerActions([
fn (string $operation): Action => Action::make('saveBasicDetails')
->label('Save changes')
->action(function (Section $component, EditRecord $livewire) {
$livewire->saveFormComponentOnly($component);

Notification::make()
->title('Basic details saved')
->success()
->send();
})
->visible($operation == 'edit'),
])
Is there a way to test it? It is inside a section of the form
2 replies
FFilament
Created by Krzysztof on 8/1/2024 in #❓┊help
Tailwind class "!" prefix removed when using Panel from custom package
No description
20 replies
FFilament
Created by Krzysztof on 5/20/2024 in #❓┊help
Hide navigation item but redirect to it when switching tenants
I have a multi-tenant app with mostly custom pages (outside of multi-tenancy, regular routes/web.php pages). When I switch tenants I have to save it to the database. But without any tenant-aware pages I do not have access to the new tenant. What I found out is that Filament is redirecting users to the first navigation item that is visible. I've created a tenant-aware page as a hack, that saves the current tenant in the mount method and redirects the user to other non-tenant page. The problem is, it needs to be present in the navigation which is not going to happen. I've also tried custom navigation builder, but it also gets the first visible item. Have anyone done something similar or is there a better way to save a tenant after switch?
3 replies