diff --git a/package.json b/package.json index ba09e3c..bf7bc7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kri-ui-registry", - "version": "0.9.2", + "version": "0.9.3", "private": true, "description": "KRI internal shadcn UI registry", "scripts": { diff --git a/registry/components/data-table/hooks/usePagination.ts b/registry/components/data-table/hooks/usePagination.ts index e64920d..67b34d7 100644 --- a/registry/components/data-table/hooks/usePagination.ts +++ b/registry/components/data-table/hooks/usePagination.ts @@ -15,7 +15,7 @@ export function usePagination({ currentPage, totalPages, paginationItemsToDispla const visibleCount = Math.max(1, paginationItemsToDisplay) const half = Math.floor(visibleCount / 2) let startPage = Math.max(1, currentPage - half) - let endPage = Math.min(totalPages, startPage + visibleCount - 1) + const endPage = Math.min(totalPages, startPage + visibleCount - 1) if (endPage - startPage + 1 < visibleCount) { startPage = Math.max(1, endPage - visibleCount + 1)