Closed EdJones closed 4 years ago
I was able to achieve the desired effect by creating a sidedrawer that is only a placeholder, that is, holds a component with variable content. Thanks to Allegator.io for explaining Swappable Dynamic Components
<template>
<component :is="dynamicComponent"></component>
</template>
<script>
import DrawerContentL1 from "./DrawerContentL1";
import DrawerContentL2 from "./DrawerContentL2";
export default {
components: {
DrawerContentL1,
DrawerContentL2
},
computed: {
dynamicComponent() {
if(this.$store.state.currentLevel=="L1") {
return 'DrawerContentL1';
} else {
return 'DrawerContentL2';
}
}
}
}
</script>`
Please, provide the details below:
Tell us about the problem
Need to be able to replace sidedrawer content.
Which platform(s) does your issue occur on?
Both
Please provide the following version numbers that your issue occurs with:
package.json
) 8.0.0tns --version
to fetch it)package.json
)"tns-android"
and"tns-ios"
properties in thepackage.json
)Please tell us how to recreate the issue in as much detail as possible.
The drawerContent property for RadSideDrawer seems to hold this. But it's not clear how to set this mid-app. (Using {N}-Vue).
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
(You can paste entire code snippets, link to playground demo or attach a runnable project)