Skip to content

Commit c99df23

Browse files
Adebesin-Cellclaude
andcommitted
fix: show load-more when server has unfetched packages
hasMore now combines both signals: items hidden by useVisibleItems AND packages not yet fetched from the server. This fixes the missing load-more button when the initial batch size equals the visibility limit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 21ecd99 commit c99df23

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/pages/org/[org].vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,17 @@ const totalPackages = computed(() => results.value?.totalPackages ?? 0)
3838
// Show first 250 packages initially; expanding triggers loadAll() to fetch remaining data
3939
const {
4040
visibleItems: packages,
41-
hasMore,
41+
hasMore: hasMoreVisible,
4242
isExpanding,
4343
expand,
4444
} = useVisibleItems(allPackages, 250, { onExpand: loadAll })
4545
const packageCount = computed(() => packages.value.length)
4646
47+
// hasMore combines both: hidden in-memory items AND unfetched server data
48+
const hasMore = computed(
49+
() => hasMoreVisible.value || allPackages.value.length < totalPackages.value,
50+
)
51+
4752
// Preferences (persisted to localStorage)
4853
const { viewMode, paginationMode, pageSize, columns, toggleColumn, resetColumns } =
4954
usePackageListPreferences()

0 commit comments

Comments
 (0)