You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser and its version:Chrome 56.0.2924.87 (64-bit)
What did you do? Please provide steps to re-produce your problem.
When I'm using a Pagination in Table, there goes to a bug.
For example, I set pageSize as 5 and set showTotal function returning a string 'Total x, now showing y to z' so I can see the changes.
First, the table shows more than 2 pages, e.g. 10, I change to page 5 or any other page after page 2.
Than, give the table a new dataSource, whose length is less than the current page range. When I'm in page 5, the table should show range 21 to 25. So I set dataSource containing 6 records.
Here it is. The Pagination will automatically reduce to 2 pages where still be good but the total tip gives me a string tells 'Total 6, now showing 21 to 6'.
I have followed the code track, then I find in the getMaxCurrent function in Table always return a current - 1 when the range lager than total. It must be a mistake.
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
lockbot
locked as resolved and limited conversation to collaborators
May 1, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
🐛 BugAnt Design Team had proved that this is a bug.
Environment(required)
What did you do? Please provide steps to re-produce your problem.
When I'm using a
Pagination
inTable
, there goes to a bug.For example, I set
pageSize
as 5 and setshowTotal
function returning a string 'Total x, now showing y to z' so I can see the changes.First, the table shows more than 2 pages, e.g. 10, I change to page 5 or any other page after page 2.
Than, give the table a new
dataSource
, whose length is less than the current page range. When I'm in page 5, the table should show range 21 to 25. So I setdataSource
containing 6 records.Here it is. The
Pagination
will automatically reduce to 2 pages where still be good but the total tip gives me a string tells 'Total 6, now showing 21 to 6'.如果一张表格
pageSize
是5,showTotal
展示'共x条记录,当前展示第y条至第z条'。首先表格的总分页数必须大于2,比如10页,切换至第5页或第2页后的任一页。
然后刷新表格数据源,记录条数要小于当前页的展示范围,比如第5页展示21条至25条,设置新记录数为6条。
然后发现,分页能够正确的减少至2页,但提示信息却展示'共6条记录,当前展示第21条至第6条'
What happen?
I have followed the code track, then I find in the
getMaxCurrent
function inTable
always return acurrent - 1
when the range lager than total. It must be a mistake.表格组件中
getMaxCurrent
方法在展示范围大于总数时,始终返回current - 1
。 因此在第2页缩减为1页数据显示正常,如果原数据超过两页,则无法正常显示。Re-producible online demo
I write a template to show the bug online.在线示例
http://codepen.io/SecMao/pen/EWWmPx?editors=0010
Hope fixed ASAP, thanks.
The text was updated successfully, but these errors were encountered: