drag-and-drop
drag-and-drop copied to clipboard
Using `insert` plugin breaks grouping rules
- Framework: Vue.js 3.5 (Composition API)
- I use
dragAndDrop()(from@formkit/drag-and-drop/vue) since I provide my own state
With insert
plugins: [
insert({
insertPoint: () => {
const div = document.createElement('div');
div.classList.add('control-sorting-indicator');
return div;
},
}),
]
https://github.com/user-attachments/assets/419afecd-d23a-4bcf-a22a-05ca8fbab3a5
As you can see, I can apparently move the elements outside of my group!
It should not work this way, each category have its own dragAndDrop and we should not be able to drag between the groups.
Without insert()
https://github.com/user-attachments/assets/d429f8be-3b90-4bfe-9d3e-0b5f57f81c09
As you can see, I am NOT able to drag the elements to the other group and no error is thrown.
Seems related to https://github.com/formkit/drag-and-drop/issues/149