Skip to content
Discussion options

You must be logged in to vote

yes, you should be keying on orderItem.productId probably.

Since your x-data is only run when that x-for entry is hit, it will refer to the item it was passed at that time.

So if you move stuff, and now the first item is a different item, that x-data would not be changed to reflect the new item (orderItem will update, but not the product).

So add a unique key and it will all be solved :)

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@njfamirm
Comment options

@njfamirm
Comment options

Answer selected by njfamirm
Comment options

You must be logged in to vote
1 reply
@ekwoka
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants