refactor: 테이블 넘버링 코드 수정

This commit is contained in:
2025-06-17 11:10:15 +09:00
parent 318bae3a1e
commit 2c9793c7be
13 changed files with 79 additions and 12 deletions
@@ -7,7 +7,12 @@ export const columns: ColumnDef<Authorizations>[] = [
{
id: "no",
header: "NO",
cell: ({ row }) => row.index + 1,
cell: ({ row, table }) => {
const totalRows = table.getRowCount();
const currentPage = table.getState().pagination.pageIndex;
const pageSize = table.getState().pagination.pageSize;
return totalRows - (currentPage * pageSize + row.index);
},
},
{
accessorKey: "authorizationName",