-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate is getting created after drop. #162
Comments
sourceParent.splice(sourceIndex, 1); |
@rishabhdev - Can you provide some type of code / demonstration of your issue? Perhaps using jsFiddle or another tool, so that I can try to help diagnose your issue? |
This might be the same issue: http://stackoverflow.com/questions/37786778/knockout-sortable-makes-duplicates-making-a-tree-structure Fiddle: http://jsfiddle.net/yyqnhngm/ To reproduce drag either A or B into the other. |
I've got the same problem as @rishabhdev; unfortunately this is some backend code that I cannot disclose and the application is quite complex - it is an observable array of observable arrays (i.e. sortable categories containing sortable items, each with a number of observable properties). I tried to simplify the example in a fiddle, however when I do that, I can no longer reproduce the problem at all, even though the nesting level is the same. There used to be a line I am currently still in the process of investigating this issue further in hopes of finding a clean (i.e. non-fork, not downgrade to 0.8.7) solution. I also try to tweak the fiddle some more to get to a point where the problem can be reproduced. It would be helpful however if somebody could explain the code changes from 0.8.7 to 0.8.8. |
Ha! I had a hunch and landed a catch - here's the fiddle that shows the issue: https://jsfiddle.net/mwollny/p0vz5Lc0/ The problem here arises through the dynamic assignment of templates to the sortable items ( If the template is static (i.e. edit: This is the same issue as has already been reported in #150 and #144, so the same workaround applies here: stripping the whitespace between the This may also be the cause of the problems with @rishabhdev 's report, but he'll have to confirm after checking his code. |
No description provided.
The text was updated successfully, but these errors were encountered: