\
Import Action not working
I've found out where the error originates from and possibly solved it. Inside the CanImportRecords trait, resposible for the actions functionality, I've modified the afterStateUpdated method on the FileUpload component (line 79) to allow the callable function to accept $state variable as an array in addition to TemporaryUploadedFile and null.
Dumping the $state variable than reveals this
array:1 [▼ // vendor\filament\actions\src\Concerns\CanImportRecords.php:80
"7d0f05fb-1017-4bbd-b017-5036c88bc071" => Livewire\Features\SupportFileUploads\TemporaryUploadedFile {#2265▼
/contents/
}
]
The TemporaryUploadedFile object just seems to be encapsulated in the array, so I can just need to retrieve the its value.
(starting at line 79)
I added this condition to the start
I'm not sure if other people have problems with this, could do a pull request if so
3 replies