filament/filament
v3.2.92
v11.13.0
v3.5.1
8.3.7
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:
Section::make('Section')
->headerActions([
Action::make('refresh')
->icon('heroicon-o-arrow-path')
->color('warning')
->size(ActionSize::Small)
->hidden(fn ($record) => !$record)
->requiresConfirmation()
->action(function($record, $livewire) {
$record = $record->fresh();
$livewire->refreshFormData(['name', 'image']);
Notification::make()
->title('Refreshed data')
->success()
->send();
}),
])
I also tried setting $record->image = [$record->image]
before refreshFormData
.
Also refreshing the FileUpload field.
refresh
action button on the edit pagehttps://github.com/MarcelWeidum/filament-refresh-fileupload-bug
foreach() argument must be of type array|object, string given
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too