Start groups open when start open

Fixes #3397
This commit is contained in:
rijkvanzanten
2020-12-11 18:15:56 -05:00
parent 398e6bc0a4
commit becba663b4

View File

@@ -21,10 +21,7 @@ export type NavItemGroup = {
let activeGroups: Ref<string[]>;
export default function useNavigation() {
if (!activeGroups) activeGroups = ref([]);
const collectionsStore = useCollectionsStore();
const userStore = useUserStore();
const customNavItems = computed<NavItemGroup[] | null>(() => {
@@ -76,5 +73,12 @@ export default function useNavigation() {
});
});
if (!activeGroups)
activeGroups = ref(
customNavItems.value
? customNavItems.value.filter((navItem) => navItem.accordion === 'start_open').map((navItem) => navItem.name)
: []
);
return { customNavItems, navItems, activeGroups };
}