Open Jackson-Wheeler opened 1 year ago
I don't see what is a bug here sorry. The behaviour of drag feedback is quite complex because of the different states it can handle. The extra feedback item should correctly not be displayed at the bottom of the list because it is a placeholder - they are in the process of dragging to the list but we don't know which position the user intends to place the element. The item has been rendered invisibly in case they do drag onto the list (especially if you have multiple DropLists on a page)
Ah yes, that is the correct functionality. However, when I ran the code in my environment, the extra feedback item was displayed by default. The second image (titled "Hovering item over DropList") shows the problem: two feedback items are visible at the same time. (the Demo I linked has the correct functionality)
Weird. I don't have any issues on my projects. Was your local environment a blank or existing project?
Here is a Demo of the problem (when dragging from top list to bottom list): https://codesandbox.io/s/dreamy-darwin-vz4qnx?file=/src/components/MyComponent.vue. Hopefully that helps.
Thanks! :) I've reopened the issue.
Hey, any updates on this issue?
-- Hello, I believe I found a bug, but I'm not 100% sure I'm not just doing something incorrectly. Hope this is helpful. --
Using core-js@3.32.0, @vue/cli 5.0.8, vue@3.3.4, vuetify@3.3.11, and vue-easy-dnd@2.1.3 Was testing code from the following Demo: https://codesandbox.io/s/droplist-ozs8b?file=/src/App.vue (EDIT: the Demo shows the correct code. However, the code was not correct in my environment (detailed above))
Upon dragging item from the left list, the right list (drop-list) displays the DragFeedback item (class="DragFeedback __feedback") at the bottom of the DropList (see images).
Dragging item from left:
Hovering item over DropList:
After investigating the source code of the demo (linked above), it seems that "vue-easy-dnd@1.2.1" sets "display: none" in the style of the DragFeedback element, such that the extra feedback item does not display at the bottom of the list:
Solution: I went into the source code of vue-easy-dnd@2.1.3 and in the if statement where the DragFeedback element is created and pushed into defaultArr I added
style: 'display: none',
to the code. This seemingly solved the problem.