Open MarcelWeidum opened 1 month ago
->action(function($record, $livewire) {
$record = $record->fresh();
$record->image = [(string) Str::uuid() => $record->image];
$livewire->record = $record;
$livewire->refreshFormData(['name', 'image']);
Notification::make()
->title('Refreshed data')
->success()
->send();
}),
Package
filament/filament
Package Version
v3.2.92
Laravel Version
v11.13.0
Livewire Version
v3.5.1
PHP Version
8.3.7
Problem description
I have an action button on a form. When I click it, it fetches the latest data from the database and should update in the form with
$livewire->refreshFormData
.Every other field works but the FileUpload throw the error:
foreach() argument must be of type array|object, string given
.My action:
I also tried setting
$record->image = [$record->image]
beforerefreshFormData
.Expected behavior
Also refreshing the FileUpload field.
Steps to reproduce
refresh
action button on the edit pageReproduction repository (issue will be closed if this is not valid)
https://github.com/MarcelWeidum/filament-refresh-fileupload-bug
Relevant log output
Donate 💰 to fund this issue