refactor: 테이블 넘버링 코드 수정
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user