From fef1f6b9287c60118392d94dee629ee6b6f90df7 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Sun, 5 Apr 2026 22:41:44 +0100 Subject: [PATCH] feat: use useVisibleItems in vulnerability tree Switches the vulnerability tree to use the new `useVisibleItems` composable. --- app/components/Package/VulnerabilityTree.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/components/Package/VulnerabilityTree.vue b/app/components/Package/VulnerabilityTree.vue index 81e636e72a..bca8eb312d 100644 --- a/app/components/Package/VulnerabilityTree.vue +++ b/app/components/Package/VulnerabilityTree.vue @@ -10,9 +10,14 @@ const { data: vulnTree, status } = useDependencyAnalysis( ) const isExpanded = shallowRef(false) -const showAllPackages = shallowRef(false) const showAllVulnerabilities = shallowRef(false) +const { + visibleItems: visiblePackages, + hasMore: hasMorePackages, + expand: expandPackages, +} = useVisibleItems(() => vulnTree.value?.vulnerablePackages ?? [], 5) + const hasVulnerabilities = computed( () => vulnTree.value && vulnTree.value.vulnerablePackages.length > 0, ) @@ -110,7 +115,7 @@ function getDepthStyle(depth: string | undefined) {