-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Current Behavior:
No animation is applied to newly loaded cards during dragging.
addIndex remains null until the card is dropped.
Root Cause:
The list of draggable elements is generated only at the start of the drag operation and does not update when new cards are loaded.
Expected Behavior:
Smooth drag-and-drop interaction should work seamlessly across all cards, including those loaded via pagination.
Suggested Fix:
Update the list of draggable elements whenever a new batch of cards is loaded (e.g., after pagination).
// exported part of container
var vueDndrop = function (element, options) {
var containerIniter = Container$1(element);
var container = containerIniter(options);
element[containerInstance] = container;
Mediator$1.register(container);
return {
dispose: function dispose () {
Mediator$1.unregister(container);
container.dispose(container);
},
setOptions: function setOptions (options, merge) {
container.setOptions(options, merge);
},
// ADD next
refreshDraggables: function refreshDraggables() {
container.setDraggables()
const draggables = container.draggables.filter(element => !element.classList.contains('dndrop-ghost'))
draggables.forEach(function (p) { return setAnimation(p, true, container.getOptions().animationDuration); })
}
};
};