Skip to content

Drag-and-drop malfunction in paginated columns #97

@DanilShum

Description

@DanilShum

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); })
}

};
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions