Skip to content

Commit

Permalink
fix(Table): Add warning when Table current is negative number
Browse files Browse the repository at this point in the history
  • Loading branch information
wadezhan committed Apr 21, 2021
1 parent 67377f2 commit d9c67ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ function Table<RecordType extends object = any>(props: TableProps<RecordType>) {
}

const { current = 1, total, pageSize = DEFAULT_PAGE_SIZE } = mergedPagination;
devWarning(current > 0, 'Table', '`current` should be positive number.');

// Dynamic table data
if (mergedData.length < total!) {
Expand Down

0 comments on commit d9c67ce

Please sign in to comment.