From 960727651da837ee8cb717dcd846ad14816b89b6 Mon Sep 17 00:00:00 2001 From: Katja Lutz Date: Thu, 23 Jun 2022 15:20:29 +0200 Subject: [PATCH] docs: comment sortablejs solidjs compatibility layer --- src/directives/sortable.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/directives/sortable.tsx b/src/directives/sortable.tsx index 56cfda9..ea9944e 100644 --- a/src/directives/sortable.tsx +++ b/src/directives/sortable.tsx @@ -10,6 +10,7 @@ export const sortable = (el: HTMLElement, config: () => Sortable.Options) => { const userOnEnd = config_?.onEnd; if (userOnEnd) { config_.onEnd = (evt) => { + // Undoes the dom structure of the list after a drag event. Ultimately this is needed to gain compatibility between sortablejs and solidjs if (evt.oldIndex != null && evt.newIndex != null) { const parent = evt.from; const oldNextSibling =