260728_01_ENH: 짜잘한 버그 수정
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kri-ui-registry",
|
"name": "kri-ui-registry",
|
||||||
"version": "0.9.2",
|
"version": "0.9.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "KRI internal shadcn UI registry",
|
"description": "KRI internal shadcn UI registry",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export function usePagination({ currentPage, totalPages, paginationItemsToDispla
|
|||||||
const visibleCount = Math.max(1, paginationItemsToDisplay)
|
const visibleCount = Math.max(1, paginationItemsToDisplay)
|
||||||
const half = Math.floor(visibleCount / 2)
|
const half = Math.floor(visibleCount / 2)
|
||||||
let startPage = Math.max(1, currentPage - half)
|
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) {
|
if (endPage - startPage + 1 < visibleCount) {
|
||||||
startPage = Math.max(1, endPage - visibleCount + 1)
|
startPage = Math.max(1, endPage - visibleCount + 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user