Skip to content

Commit

Permalink
pkp/pkp-lib#9890 Add command on root items to navigate to links
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Sep 3, 2024
1 parent 40f7ad3 commit 72e69ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/composables/useSideMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ export function useSideMenu(_items, _activeItemKey = '', _expandedKeys = {}) {
item.items = mapItems(_item.items, level + 1);
}

if (level === 1 && item.link && !_item.items) {
item.command = () => {
window.location.href = item.link;
};
}

result.push(item);
});

Expand Down

0 comments on commit 72e69ee

Please sign in to comment.