-
-
Notifications
You must be signed in to change notification settings - Fork 245
Consecutive v-if
stop reactive properties
#127
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
Comments
Update: Looks like the difference between the working/non-working example (in terms of the render function) is that the working [
(foo) ? _c(Enable) : _c(Disable)
] (shortened here), while the consecutive [
(foo) ? _c(Enable) : _e(),
(!foo) ? _c(Disable) : _e(),
]
The issue lies in the logic of I need to re-visit the whole renderer - which will take some time, but at least the cause is now known! |
@rigor789 I'm not sure if the fix is completely working. Sometimes if you remove and add a vnode from the tree the order change! |
…does weird change the components order and I think is because nativescript-vue#127 is not completely fixed.
…does weird change the components order and I think is because nativescript-vue#127 is not completely fixed.
* feat (wrap ns components): Wrap the Label NS component into a Vue's one. * feat (wrap ns components): Refactor the way that the Vue components are registered. * feat (wrap ns components): New registerComponent function which would be the way to wrap and register new NS and Vue components. * feat (wrap ns components): Wrap a Vue component if no component is passed to the registerComponent function. Refactored Label component as it's the simpler case to refactor. * feat (wrap ns components): Begin an sample app with all the components. For now only the Label one. * feat (wrap ns components): Make v-model work also in the automatically wrapped Vue components. Register DatePicker. * feat (wrap ns components): Add DatePicker component to the app-with-all-components app * feat (wrap ns components): Better not using v-bind and v-on shorthands here. * feat (wrap ns components): Another way for wrapping components which is not working yet. * feat (wrap ns components): Some fixes following the @rigor789 guidelines * feat (wrap ns components): Fix a typo. * feat (wrap ns components): Debug the label component internals. * feat (wrap ns components): Fix some typos. * feat (wrap ns components): no need for return the entry. * feat (wrap ns components): Change a second v-if to v-else because it does weird change the components order and I think is because #127 is not completely fixed. * feat (wrap ns components): Some fixes. * feat (wrap ns components): Fix the render function for wrapped components. * feat (wrap ns components): In order to keep the $refs, we pass the context.data object entirely to the component. * feat (wrap ns components): Wrap DatePicker and Button elements. Add them to the test app. * feat (wrap ns components): Destructured render function. * feat: wrap all elements in a functional vue component BREAKING CHANGE: All elements are now Vue components, in some cases where a ref is used to get the nativeView will have to be updated to use `this.$refs.element.$el.nativeView` instead of `this.$refs.element.nativeView`. There may be other breaking changes this introduces that are not known at this point. re #266 re #241 * test: update expectations for normalized element names
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. |
Uh oh!
There was an error while loading. Please reload this page.
Whenever in the same hierarchy, there are multiple
v-if
, and av-if
becometrue
, all reactive properties stop working altogether. This means all Vue reactive properties does not work anymore in the entire app, even if the page is destroyed. The only way is to reload the app.As a workaround:
v-if
alongv-else-if
orv-else
are not affected,v-show
is also not affected.The bug has been reproduced by @rigor789 .
This causes the issue:
However this is working:
And this is also working:
The text was updated successfully, but these errors were encountered: