Open westlakem opened 6 years ago
I don't think this is a bug, it is expected behaviour. You need to specify the (onDrop) event to move items between containers. See https://github.com/ObaidUrRehman/ng-drag-drop#transfer-data-via-drag-drop
Hi, i have a similar error; Could you help me?
My case its the following:
I take (Drag) a element of my list1 and when i (Drop) this element on list2, It isnt move & send a Error on console:
TypeError: Cannot read property 'map' of undefined
at UserDashboardComponent.push../src/app/
I have reviewed the code and it is in this segment where it marks the error:
onDropSelected(e: DropEvent){
this.productList.push(e.dragData);
this.removeItem(e.dragData, this.products);
}
onDropProducts(e: DropEvent){ this.products.push(e.dragData); this.removeItem(e.dragData, this.productList); }
removeItem(item: any, list: Array
Thanks, bros
Please remove sections that are not required.
I'm submitting a ... [ X ] bug report [ ] feature request [ ] other
What is the current behavior?
Dropping an item doesn't move it
When I drag something into the drop zone it should move
Please tell us about your environment:
Angular version: 6.0.3
Chrome 64