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
repeat binding fails to maintain ordering of DOM nodes when item is removed and reinserted at a different location in the array #537
Comments
@jdanyow @martingust We need to look into this immediately. This is highest priority. |
@ohjames / @ben-girardet we can look into this if you can provide a reproduction of the issue: |
I've moved on from Aurelia so won't be providing a reproduction, it is however very trivial to reproduce. Fail to react to this gravely important issue at Aurelia's peril. |
Option 1 seems to be working fine in this gist |
I tested both option 1 and option 2 and could not reproduce any issues. The second option did have invalid JavaScript code though (if used with an array of strings). Here's a correct version that can be dropped into the gist above:
|
@EisenbergEffect I could reproduce the issue but with the Actually I noticed that the |
@sebastien-roch So, you are saying that when you have a repeat, with a compose inside of that repeat and there's a containerless attribute on the compose, that's when it breaks? |
That's something I can go on. With that information I have an idea already. |
@EisenbergEffect at least it's when it breaks for me. I could only reproduce this problem with |
Yes. I have a suspicion about what might be the cause. I'll test it out later today. Thanks for tracking down that detail! |
…e of a template controller Fixes aurelia/binding#537
@sebastien-roch Thanks for the info. It's fixed and will go out in the next release in the next day or two. |
Copying the comment by @ben-girardet as it's in the closed issue #233 and I fear that what seems like a very important issue is being buried by being a comment in a closed issue:
Both options have problems when the view gets updated. Sometime the moved item gets duplicated, sometimes the array gets an empty new item, sometimes an item gets missing, ...
Further to this I (@ohjames) have found that it also triggers if I splice the entire array to empty it and then insert all the new items to represent the new order. The item that was moved ends up in the wrong place, duplicated or busted.
The text was updated successfully, but these errors were encountered: