kutlugsahin / vue-smooth-dnd

Vue wrapper components for smooth-dnd
MIT License
1.73k stars 250 forks source link

Drag-enter event doesn't fire when draging over non-accepting container #150

Open BerciTheBeast opened 4 years ago

BerciTheBeast commented 4 years ago

Hello,

I have several containers in the form of columns (think Trello), and I'm dragging items in those columns from one column to another. The problem is that not all columns accept all items, but I would still like for the column to emit an event even if it can't accept the item. Is there such an event?

Problem: When dragging items across containers drag-enter events aren't being fired if the container can't accept the item.

Expected behavior: Container fires an event when an item is dragged over it / enters its area,

xuyanzhuqing commented 4 years ago

i guess i meet the same question, i want to limited the numbers of i droped in the container, but there is no callback (actually i use onDrop, but it doesn't well work) to satisify, now, i got an iead, could we to set an stack, to record each data's changed

Cmacu commented 4 years ago

You can do that via should-allow-drop, it triggers on all elements, you can pass any extra data you want to it. This is more of a Vue question than anything specific to this library. You can also use drop zones or return the item to it's source after to drop as rejection.