-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛[BUG] ProTable 分页问题 #71
Comments
fixed,现在会重置页码 |
这个问题现在依旧还在 |
配合EditableProTable使用时,如果开启了行内新增数据,同时设置了pagination: {pageSize: number},在点击新增的时候还是会出现警告提示([antd: Table] dataSource length is less than pagination.total but large than pagination.pageSize. Please make sure your config correct data with async mode) @chenshuai2144 |
This was referenced Oct 15, 2021
贴一个我自己的解决方法供大家参考: ##3436 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 bug 描述
ProTable 分页bug。非第1页,将pageSize改为比现有size小的数时,没有重新请求更新数据,表格显示的是原有页码的前几条,且当前页码显示为第1页,不正确([antd: Table]
dataSource
length is less thanpagination.total
but large thanpagination.pageSize
. Please make sure your config correct data with async mode.)📷 复现步骤
1、初始状态,默认current为1,pageSize为20,请求current=1&pageSize=20,得99-80 --- 正确
2、点击下一页,current为2,pageSize为20,请求current=2&pageSize=20,得79-60 --- 正确
3、切换pageSize为10,没有重新请求,表格显示79-70,底部显示当前页码为第1页,控制台出现警告 --- 错误
4、点击下一页,没有发送请求,显示69-60,再下一页表格将为空 --- 错误
🏞 期望结果
3中,请求current=2&pageSize=10
💻 复现代码
© 版本信息
🚑 其他信息
The text was updated successfully, but these errors were encountered: