Skip to content

Commit

Permalink
fix(table): index column value error #187
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Jan 14, 2021
1 parent 6d5c49f commit 056fc13
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Table/src/hooks/useColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ function handleIndexColumn(
return `${index + 1}`;
}
const { current = 1, pageSize = PAGE_SIZE } = getPagination;
const currentIndex = (current - 1) * pageSize + index + 1;
return currentIndex;
return ((current < 1 ? 1 : current) - 1) * pageSize + index + 1;
},
...(isFixedLeft
? {
Expand Down

0 comments on commit 056fc13

Please sign in to comment.