sortablejs-vue3
sortablejs-vue3 copied to clipboard
`onMove` incompatible with SortableJs
emit('onMove') does not have the desirable effect
In SortableJs, you are able to cancel a move by returning a value from onMove() call. However, because of the way the code is implemented right now, this functionality is completely disabled.
https://github.com/MaxLeiter/sortablejs-vue3/blob/201bff662acf2d09e82e99057c6524fc1e8930d2/src/components/Sortable.vue#L91-L116
Related issue https://github.com/vuejs/core/issues/8865
The reason is because emit() does not return the value from the handler.
Here are some proposals
- Use props instead of emits
- Respect the
SortableOptioninstead of always overwriting them - Wait until Vue updates emit behavior, and mention that this functionality doesn't work
I am willing to submit a pr