mirror of
https://github.com/directus/directus.git
synced 2026-01-24 15:27:59 -05:00
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user