Skip to content

Commit fbb1ffd

Browse files
committed
add test case
1 parent c6405f3 commit fbb1ffd

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Pagination.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@ const Pagination: React.FC<PaginationProps> = (props) => {
189189
}
190190

191191
function changePageSize(size: number) {
192-
if (!showSizeChanger) {
193-
return;
194-
}
195192
const newCurrent = calculatePage(size, pageSize, total);
196193
const nextCurrent =
197194
current > newCurrent && newCurrent !== 0 ? newCurrent : current;

tests/sizer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('Pagination with sizer', () => {
8484
).toHaveTextContent('20 条/页');
8585
});
8686

87-
describe('Pagination with showSizeChanger', () => {
87+
describe('showSizeChanger is object', () => {
8888
const options = [
8989
{ value: '10', label: '10 条每页' },
9090
{ value: '25', label: '25 条每页' },

0 commit comments

Comments
 (0)