Setting handle leads to unexpected behaviour
See original GitHub issueHello, and thanks for an awesome plugin!
I came across an unexpected behaviour when using handle
option and binding a bool on a checkbox.
My example element’s underlying structure: { name: "Adam", available: false }
In element’s v-for
loop I have a regular checkbox with v-model="element.available"
List 1 serves as a model from which I clone (deep-clone) elements to List 2 and then operate (check and reorder) on List 2 only.
Checking and immediately unchecking an element’s checkbox, and then grabbing the element but putting it back to the same place causes the checkbox to toggle, even though available
is still false
. “Putting things back” is not the only case when this self-toggling happens but it’s the easiest way to encounter it.
At the same time when handle
isn’t set, everything is fine.
Jsfiddle link
With handle: https://jsfiddle.net/ianshade/8vb86tdy/ (incorrect behaviour)
Without handle: https://jsfiddle.net/ianshade/z2j4x4k4/ (correct behaviour)
Step by step scenario
- Drag two or more items from List 1 to List 2
- Check and uncheck an item’s checkbox (like as you were an undecided user)
- Begin dragging that item but put it back to where it’s been (a very undecided user)
- See the checkbox toggle by itself even though underlying model is
false
Edit: I’m using the latest versions provided: Vue.Draggable@2.16.0, sortablejs@1.7.0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
@trevorgehman I will provide.
Corrected in version 2.18.0