dododedodonl
dododedodonl
FFilament
Created by dododedodonl on 8/20/2024 in #❓┊help
FileUpload removeUploadedFile
On a create form; when a user presses the "X" in filepond to delete an uploaded file field (with mutliple uploads enabled), the page seems to directly call removeUploadedFile on Filament\Forms\Components\BaseFileUpload. This updates the state after a user interaction; but does not trigger afterStateUpdated() as far as I can tell. 1. Is there a specific reason it does not? 2. I need to run a piece of code to update other parts of the form is a file removed this way, it does not seem possible right now. Should a call to afterStateUpdated be added or a specific callback? Or did I miss something?
2 replies
FFilament
Created by dododedodonl on 2/2/2024 in #❓┊help
Redirect in SPA mode
When using a <x-filament::button ...> component to go to a internal route (eg. example.test/route1), which almost always redirects (302) to an external url. Because the href on the button is an internal url, Filament\Support\generate_href_html adds wire:navigate to the button. This does not work, as the external resource has CORS headers preventing this. How can I use <x-filament::button ...> in SPA mode and prevent wire:navigate added to it?
4 replies