Open birds-inc opened 9 years ago
Migrating our sortable interface and encountered this issue.
We use the .disabled class on our li's to make them not-selectable - this class is dynamically applied over the life of the list.
.disabled
li
sortable: { data: list.listItems, options: { items: 'li:not(.disabled)' }
Sortable was able to handle this just fine. However, with knockout-sortable I have to use the cancel binding instead:
sortable: { data: list.listItems, options: { items: 'li', cancel: '.disabled', }
Calling .sortable("toArray") shows the list has been correctly updated, but knockout-sortable is preventing from the draggable behavior from being removed from the disabled items.
Migrating our sortable interface and encountered this issue.
We use the
.disabled
class on ourli
's to make them not-selectable - this class is dynamically applied over the life of the list.Sortable was able to handle this just fine. However, with knockout-sortable I have to use the cancel binding instead:
Calling .sortable("toArray") shows the list has been correctly updated, but knockout-sortable is preventing from the draggable behavior from being removed from the disabled items.