Tables\Actions\Action::make('import')
->form([
FileUpload::make('file')
->label('')
->acceptedFileTypes(['application/json', 'json'])
->imagePreviewHeight('250')
->reactive()
->afterStateUpdated(function (callable $set, TemporaryUploadedFile $state) {
$set('fileRealPath', $state->getRealPath());
}),
Hidden::make('fileRealPath'),
])
->label('')
->tooltip('Import')
->icon('heroicon-o-folder-open')
->action('import'),
Tables\Actions\Action::make('import')
->form([
FileUpload::make('file')
->label('')
->acceptedFileTypes(['application/json', 'json'])
->imagePreviewHeight('250')
->reactive()
->afterStateUpdated(function (callable $set, TemporaryUploadedFile $state) {
$set('fileRealPath', $state->getRealPath());
}),
Hidden::make('fileRealPath'),
])
->label('')
->tooltip('Import')
->icon('heroicon-o-folder-open')
->action('import'),