Hide disabled namespace from sidebar namespace dropdown

This commit is contained in:
Jože Fortun
2023-03-06 10:39:11 +01:00
parent 3845a2c564
commit 4d5a73e33f
@@ -8,7 +8,7 @@
label="name"
class="namespace-selector sticky-top bg-white mt-2"
:clearable="false"
:options="namespaces"
:options="filteredNamespaces"
:value="namespace"
:selectable="option => option.namespaceID !== namespace.namespaceID"
:placeholder="$t('pickNamespace')"
@@ -252,6 +252,10 @@ export default {
return []
},
filteredNamespaces () {
return this.namespaces.filter(({ enabled }) => enabled)
},
navItems () {
const current = this.filteredPages
const ax = this.pageIndex(this.isAdminPage ? this.adminRoutes() : this.pages.map(publicPageWrap))