The Sortable v2.0.0 was released in November 2018 and introduced major changes in the behavior of the component.
||Sortable v2.x and later
SortableComponent handles all operations internally and changes
[data] on the fly.
SortableComponent does not handle operations and no longer automatically updates the
[data] array. This means that while the dragging of items will provide visual cues, it is now the application that has to subscribe to the Sortable events and call its API methods for adding, moving or removing items.
SortableComponent emits events continuously in a similar way in which the native
drag events are emitted by the browser.
SortableComponent emits a single
drag event each time an item is dragged over another item.
||* You can prevent the default behavior of each event by using the
preventDefault method of the event argument.
Since the Sortable does not automatically update the
[data] array, you need to use the
SortableBindingDirective to handle the scenarios which were previously provided for out of the box and avoid repetitive code.