Skip to content

Items are always cloned when moving between different sortables #7

Open
@patrickguenther

Description

@patrickguenther

The problem seems to be in knockout-sortable.js line 124:

moveItem(itemVM, removeOperation.collection, addOperation.collection, addOperation.event.clone, addOperation.event);

The fourth parameter seems to be the DOM-node of the hovering element when pulling an item from a list, but the function call expects a boolean value from options object that tells sortablejs whether or not the item should be cloned when moving to another list. Since a DOM node is a truthy value the items are always cloned.
Since I don't use cloning elements in my code I hardcoded that line to

moveItem(itemVM, removeOperation.collection, addOperation.collection, /**addOperation.event.clone*/false, addOperation.event);

for now but it's not pretty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions