Skip to content

Commit

Permalink
Merge pull request #375 from awcodes/fix/lazy-load-panel-images
Browse files Browse the repository at this point in the history
Fix: Unnecessary image loading before panel is called
  • Loading branch information
awcodes authored Dec 9, 2023
2 parents 094ed59 + c2d66bc commit 52e0554
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/Modals/CuratorPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Storage;
use Livewire\Attributes\Lazy;
use Livewire\Attributes\On;
use Livewire\Component;
use Livewire\WithPagination;
use Symfony\Component\HttpFoundation\StreamedResponse;

#[Lazy]
class CuratorPanel extends Component implements HasForms, HasActions
{
use InteractsWithActions;
Expand Down Expand Up @@ -96,13 +98,13 @@ class CuratorPanel extends Component implements HasForms, HasActions
public function mount(): void
{
$this->form->fill();
$this->files = $this->getFiles();
}

#[On('open-modal')]
public function openModal(string $id, array $settings = []): void
{
if ($id === 'curator-panel') {
$this->files = $this->getFiles();
$this->acceptedFileTypes = $settings['acceptedFileTypes'];
$this->directory = $settings['directory'];
$this->diskName = $settings['diskName'];
Expand Down

0 comments on commit 52e0554

Please sign in to comment.