Browse Source

fix(table): index column value error #187

pull/218/head
vben 6 years ago
parent
commit
056fc13116
  1. 3
      src/components/Table/src/hooks/useColumns.ts

3
src/components/Table/src/hooks/useColumns.ts

@ -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
? {

Loading…
Cancel
Save