From 9da8e441dd3520129fb6dc41d768f71230c534bb Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 28 Dec 2023 09:58:28 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20sorting=20when=20using=20S?= =?UTF-8?q?PA=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/kanban-scripts.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/kanban-scripts.blade.php b/resources/views/kanban-scripts.blade.php index b4c0c78..da1ab8b 100644 --- a/resources/views/kanban-scripts.blade.php +++ b/resources/views/kanban-scripts.blade.php @@ -20,7 +20,7 @@ function onUpdate(e) { Livewire.dispatch('sort-changed', {recordId, status, orderedIds}) } - window.onload = () => { + document.addEventListener('livewire:navigated', () => { @foreach($statuses as $status) {{-- dont touch this line --}} Sortable.create(document.getElementById('{{ $status['id'] }}'), { @@ -34,5 +34,5 @@ function onUpdate(e) { onAdd, }) @endforeach - } + })