-
-
Notifications
You must be signed in to change notification settings - Fork 245
<component> with nested custom component doesn't work properly #217
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
Seems to be working on Android, but not on iOS. I checked the generated render functions, and they are identical, so the issue is somewhere else. |
I think this is related, in this example .vue file, the v-if is not working specifically in iOS using v1.3.2-rc.4. It works ok on Android any version and works ok in iOS and Android using version v1.3.1 <template>
<FlexboxLayout flexDirection="column" width="100%" height="100%">
<FlexboxLayout flexDirection="row" width="100%" height="90%">
<AbsoluteLayout width="50%" height="100%" backgroundColor="#f00"/>
<AbsoluteLayout ref="content0" v-if="shouldShow" width="50%" height="100%" backgroundColor="#0f0"/>
</FlexboxLayout>
<Button text="click" width="100%" height="10%" @tap="onClick"/>
<Label :text="this.shouldShow" textAlignment="center"/>
</FlexboxLayout>
</template>
<script>
export default{
components:{
},
data(){
return{
shouldShow:true,
};
},
methods:{
onClick:function(){
this.shouldShow = !this.shouldShow;
console.log(this.shouldShow);
}
}
};
</script> |
I am also having some issues with nested components, but only if using the typescript .vue file format |
I've tested the |
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. |
Really confusing bug, at least for me.
Online demo: https://play.nativescript.org/?template=play-vue&id=cXD8qx
If I load
CustomComponent
via<component>
, the tapping will not update the view (butconsole.log()
works fine). If load it as a normal child component like<PageContent/>
, or remove the<CustomComponent/>
, everything back to normal.When issue happens, NSVue log says something like:
Or sometime:
The text was updated successfully, but these errors were encountered: