fix(Table): Add warning when Table current is negative number

This commit is contained in:
wadezhan 2021-04-21 13:47:05 +08:00 committed by GitHub
parent 67377f2735
commit d9c67cec59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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!) {