From 38396a3f3c45822723ee2d693597cf2724296e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morel?= Date: Fri, 18 Oct 2024 15:43:31 +0200 Subject: [PATCH] Fix labelIdle localization bug to show correct label (#24) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update upload.blade.php Check if placeholder was passed from livewire component * Use shorthand ternary --------- Co-authored-by: Sébastien Morel --- resources/views/upload.blade.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/views/upload.blade.php b/resources/views/upload.blade.php index 7d1a6ec..bdf9d8d 100644 --- a/resources/views/upload.blade.php +++ b/resources/views/upload.blade.php @@ -1,3 +1,7 @@ +@php +$isCustomPlaceholder = isset($placeholder); +@endphp + @props([ 'multiple' => false, 'required' => false, @@ -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) => {