Skip to content

Table pagination creates white spaces when pagination show per page changes from larger values to smaller values #6891

@hayden-664

Description

@hayden-664
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.4

Environment

macos 13.5

Reproduction link

https://codepen.io/

Steps to reproduce

  • Have a table with lot of records. (500 records)
  • Change show per page to 500.
  • Change show per page to a lower value: 100.
  • You will see white spaces appeared.

What is expected?

No white spaces will appear regardless of how I change the number of records to show per page.

What is actually happening?

When I change show per page from 500 to 100, I can see from the inspection tool that the padding-top and padding-bottom of the (.ant-table-body > table) is not recalculating. This means that the 100 records that are showing are actually occupying a space of 500 records. This extra spaces are created from the padding-top and padding-bottom calculated when I change the show per page from 100 to 500.


My guess is that the javascript function to re-calculate pagination for some scenarios is not triggers. My scenario is changing show per page from 500 to 100. Lower values like 50 to 10 or 100 to 50 works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions