I ended up solving the issue by adding the following within the component export:
created() {
// Make sure the correct option is shown on load
this.accountMenuOption = this.$router.history.current.fullPath;
},
watch: {
// Watch for route changes
$route(route) {
// Change the value of the selected option
this.accountMenuOption = route.path;
},
},
I’m new to Vue, so not sure why exactly this solves my problem, but it does. If anyone wants to explain, feel free to.
CLICK HERE to find out more related problems solutions.