|
|
@ -10,6 +10,7 @@ export const sortable = (el: HTMLElement, config: () => Sortable.Options) => {
|
|
|
|
const userOnEnd = config_?.onEnd;
|
|
|
|
const userOnEnd = config_?.onEnd;
|
|
|
|
if (userOnEnd) {
|
|
|
|
if (userOnEnd) {
|
|
|
|
config_.onEnd = (evt) => {
|
|
|
|
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) {
|
|
|
|
if (evt.oldIndex != null && evt.newIndex != null) {
|
|
|
|
const parent = evt.from;
|
|
|
|
const parent = evt.from;
|
|
|
|
const oldNextSibling =
|
|
|
|
const oldNextSibling =
|
|
|
|