Skip to content

Commit

Permalink
fix infolist bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Nascimento committed Sep 5, 2024
1 parent db384ff commit fdfd679
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Infolists/Components/PdfViewerEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use Closure;
use Filament\Infolists\Components\ViewEntry;
use Illuminate\Support\Facades\Storage;
use Illuminate\Contracts\Filesystem\Filesystem;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Support\Facades\Storage;
use League\Flysystem\UnableToCheckFileExistence;
use Throwable;

Expand Down Expand Up @@ -46,6 +46,13 @@ public function getDiskName(): string
return $this->evaluate($this->disk) ?? config('filament.default_filesystem_disk');
}

public function fileUrl(string|Closure $fileUrl): self
{
$this->fileUrl = $fileUrl;

return $this;
}

public function getFileUrl(?string $state = null): string
{
if (! $state) {
Expand Down Expand Up @@ -83,6 +90,11 @@ public function getFileUrl(?string $state = null): string
return $storage->url($state);
}

// public function getFileUrl(): string
// {
// return $this->evaluate($this->fileUrl);
// }

public function getVisibility(): string
{
return $this->evaluate($this->visibility);
Expand Down

0 comments on commit fdfd679

Please sign in to comment.