diff --git a/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj b/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj index c9518867..0243d39e 100644 --- a/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj +++ b/src/components/BootstrapBlazor.Sortable/BootstrapBlazor.Sortable.csproj @@ -1,7 +1,11 @@ - - 9.0.3 + + 9.0.4 + + + + 10.0.0-rc.2.1.0 @@ -9,10 +13,14 @@ Bootstrap UI components extensions of SortableJS - + + + + + diff --git a/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.js b/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.js index 37ee1864..f4908dd1 100644 --- a/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.js +++ b/src/components/BootstrapBlazor.Sortable/Components/SortableList.razor.js @@ -104,7 +104,7 @@ const initSortable = (id, element, invoke, op) => { } if (op.triggerAdd) { - op.onAdd = event => { + op.onAdd = async event => { var closestParent = event.from.closest('.bb-sortable'); if (closestParent) { const items = []; @@ -116,7 +116,11 @@ const initSortable = (id, element, invoke, op) => { else { items.push({ oldIndex: event.oldIndex, newIndex: event.newIndex, FromId: closestParent.id }); } - invoke.invokeMethodAsync('TriggerAdd', items); + + await invoke.invokeMethodAsync('TriggerAdd', items); + if (event.pullMode === 'clone') { + event.item.remove(); + } } } }