daikazu
daikazu
FFilament
Created by daikazu on 12/19/2024 in #❓┊help
FileUpload Component is reloading after the first upload
I have a ComponentAction that opens a model that contains a FileUpload field. After uploading the first file the field resets spitting out Cannot read properties of null (reading 'getFiles') from file-upload.js?v=3.2.131.0:40. I can then immediately attach a file again and then it works fine. When i submit the form the form data object shows to have both files. Any help here would be appreciated.
ComponentAction::make('Message')
->label('Message')
->icon('heroicon-s-chat-bubble-bottom-center-text')
->modalDescription('Send us a message or files regarding this order.')
->modalSubmitActionLabel('Submit')
->form([

Textarea::make('message')
->rows(5),
FileUpload::make('attachments')
->disk('s3')
->multiple(),
])
->action(function (Opportunity $record, $data) {
return true;
}),
ComponentAction::make('Message')
->label('Message')
->icon('heroicon-s-chat-bubble-bottom-center-text')
->modalDescription('Send us a message or files regarding this order.')
->modalSubmitActionLabel('Submit')
->form([

Textarea::make('message')
->rows(5),
FileUpload::make('attachments')
->disk('s3')
->multiple(),
])
->action(function (Opportunity $record, $data) {
return true;
}),
7 replies