-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Child element order not maintained with v-if #608
Comments
I have seen this before, but I can't remember being able to track down the issue. However, there is a workaround that seems to solve it by using This might not be a solution in all cases, but worth giving it a try. |
That definitely does work and helps me move past my current issue in this case. Now the log shows "InsertBefore" for that element and it appears where it should. |
StackLayout is not rendering its children in the right order in 2.6.2. |
@teddysasmita mind sharing an example? Edit: found the issue - have a fix just testing it to make sure everything works! Edit 2: Fixed in 2.6.3 |
We are locking this issue because it has been closed for more than 14 days. If the issue comes up again please open a new issue with additional details. |
Version
2.4.0
Reproduction link
https://play.nativescript.org/?template=play-vue&id=2rEhAr
Platform and OS info
Android
Steps to reproduce
When actions are taken to cause a re-render of a page, elements that were previously hidden by v-if are appended to the parent at the wrong location.
What is expected?
Order of the elements from the source code should be preserved even as the data causing the re-renders changes.
What is actually happening?
It appears that a basic remove/append operation is occurring; so elements being brought into existence are appearing at the end of the container instead of where they are in the source template.
This is the same minimal production code in Vue for web. Note that the last button remains the last button always.
https://codesandbox.io/s/jovial-bash-fq8by
The text was updated successfully, but these errors were encountered: