Prevent drag helper from being added to sortable List using knockout [closed]
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this questionIssue
When dragging an item from the toolbar to an observation group the item is correctly added, but the drag helper is also added to the sortable list.
Desir开发者_Go百科ed Functionality
Drag an element from the toolbar onto an observation group. Depending on what type of observation it is, display the correct template for input.
http://jsfiddle.net/PQL9T/2/
In your sortableList binding, looks like you want to remove the item at the end, since you will be rendering an item based on what you push to your collection.
//Add Item to list
collection.splice(newIndex, 0, collectionItem);
valueAccessor().valueHasMutated();
ui.item.remove(); //add this line
精彩评论