F
Filament5mo ago
Wiebe

afterStateUpdated not called in fileupload

i'm trying to use the afterStateUpdated on a fileupload in an action but its never called.
FileUpload::make('file')

->required()
->visibility('private')
->storeFiles(false)

->afterStateUpdated(function (FileUpload $component, Component $livewire, Set $set, ?TemporaryUploadedFile $state) {
dd($state);
}),
FileUpload::make('file')

->required()
->visibility('private')
->storeFiles(false)

->afterStateUpdated(function (FileUpload $component, Component $livewire, Set $set, ?TemporaryUploadedFile $state) {
dd($state);
}),
2 Replies
Dhru
Dhru5mo ago
just an educated guess but i think one of the parameters in the closure is causing the issue. can you try something like this and see if it works and then gradually add more parameters ->afterStateUpdated(function ($state){ dd ($state) }
Wiebe
WiebeOP5mo ago
@Dhru also doesnt work unfortunately

Did you find this page helpful?