diff --git a/app/components/Package/VulnerabilityTree.vue b/app/components/Package/VulnerabilityTree.vue index 81e636e72..bca8eb312 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) {