Skip to content

Commit

Permalink
Fix labelIdle localization bug to show correct label (#24)
Browse files Browse the repository at this point in the history
* Update upload.blade.php

Check if placeholder was passed from livewire component

* Use shorthand ternary

---------

Co-authored-by: Sébastien Morel <[email protected]>
  • Loading branch information
dragonfly4 and Sébastien Morel authored Oct 18, 2024
1 parent b059c4a commit 38396a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/views/upload.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@php
$isCustomPlaceholder = isset($placeholder);
@endphp

@props([
'multiple' => false,
'required' => false,
Expand Down Expand Up @@ -91,7 +95,9 @@ class="{{ $attributes->get('class') }}"
pond.setOptions(@js($pondProperties));
@if($isCustomPlaceholder)
pond.setOptions({ labelIdle: @js($placeholder) });
@endif
pond.addFiles(files)
pond.on('addfile', (error, file) => {
Expand Down

0 comments on commit 38396a3

Please sign in to comment.