Skip to content

Commit 05222b6

Browse files
Dean OhashiDean Ohashi
authored andcommitted
Available parents change by active route
1 parent 20318db commit 05222b6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/ParentMultiselect.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ export default {
2727
...mapState([
2828
'routes',
2929
'componentMap',
30-
'activeComponent'
30+
'activeComponent',
31+
'activeRoute',
32+
'routes'
3133
]),
3234
options () {
33-
const routes = Object.keys(this.routes)
34-
const exceptions = new Set(['App', ...routes])
35-
return Object.keys(this.componentMap).filter(component => {
36-
if (!exceptions.has(component)) return component
37-
})
35+
return this.routes[this.activeRoute].map(component => component.componentName)
3836
}
3937
},
4038
methods: {

0 commit comments

Comments
 (0)