Skip to content
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

Copying list items from other list but should create new scope or watch #59

Closed
MBing opened this issue Oct 29, 2014 · 1 comment
Closed

Comments

@MBing
Copy link
Contributor

MBing commented Oct 29, 2014

I have this case where I am using a main list with subitems and when you click a main item you get its subitems who should be draggable.
http://plnkr.co/edit/6s03Gq

It's hard to explain exactly everything, so I made this plunkr and if you follow these steps you will see the problem:

  • Drag the first 'subitem 0_0' down below 'subitem 0_1'
  • Click 'Main item 1'
    • Drag the first item 'subitem 1_1' down to any other place
      --> You will see it not only took this item. but you will also have a subitem from the previous list being attached to it 'subitem 0_0'.
@MBing
Copy link
Contributor Author

MBing commented Oct 29, 2014

I changed ng-repeat="subItem in currentMainItem.subItems track by $index" to
ng-repeat="subItem in currentMainItem.subItems"

and it all worked fluently!
So closing this and plunker is updated.

@MBing MBing closed this as completed Oct 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant