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

Array update order error #5597

Closed
NameWjp opened this issue Mar 16, 2022 · 2 comments
Closed

Array update order error #5597

NameWjp opened this issue Mar 16, 2022 · 2 comments

Comments

@NameWjp
Copy link

NameWjp commented Mar 16, 2022

Version

3.2.25

Reproduction link

github.com

Steps to reproduce

npm ci.
npm run dev.
open.chrome console.
click change image list.

What is expected?

/src/images/1.jpg
/src/images/2.jpg
/src/images/3.jpg
/src/images/4.png
/src/images/5.jpg
/src/images/6.png
/src/images/7.jpg
/src/images/8.jpg

What is actually happening?

/src/images/1.jpg
/src/images/2.jpg
/src/images/8.jpg
/src/images/7.jpg
/src/images/6.png
/src/images/5.jpg
/src/images/4.png
/src/images/3.jpg

@LinusBorg
Copy link
Member

This is expected behavior. The order in which child components are created during v-for loops is not guaranteed and depends on the kind of change that is being processed.

@NameWjp
Copy link
Author

NameWjp commented Mar 17, 2022

This seems to be the default behavior for Vue2, is there an alternative in Vue3?

@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants