We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.33.5
3.2.45
Chrome
Windows10
https://github.com/tusen-ai/naive-ui/blob/main/src/pagination/src/Pagination.tsx
在Table中使用Pagination组件,翻到最后一页的时候,endIndex显示的值是错误的
上述链接中的代码 if (itemCount !== undefined) { return endIndex > itemCount ? itemCount : endIndex; } 这里的要改成 return endIndex > itemCount - 1 ? itemCount - 1 : endIndex;
Pagination组件endIndex计算错误
The text was updated successfully, but these errors were encountered:
endIndex
fix(pagination): endIndex calc incorrect, closes tusen-ai#4057
5d146f2
fix(pagination): endIndex is incorrect if there's only 1 page of data (…
2e34313
…#4058) * fix(pagination): `endIndex` calc incorrect, closes #4057 * test(pagination): pagination info
Successfully merging a pull request may close this issue.
TuSimple/naive-ui version (版本)
2.33.5
Vue version (Vue 版本)
3.2.45
Browser and its version (浏览器及其版本)
Chrome
System and its version (系统及其版本)
Windows10
Node version (Node 版本)
Reappearance link (重现链接)
https://github.com/tusen-ai/naive-ui/blob/main/src/pagination/src/Pagination.tsx
Reappearance steps (重现步骤)
在Table中使用Pagination组件,翻到最后一页的时候,endIndex显示的值是错误的
Expected results (期望的结果)
上述链接中的代码
if (itemCount !== undefined) {
return endIndex > itemCount ? itemCount : endIndex;
}
这里的要改成
return endIndex > itemCount - 1 ? itemCount - 1 : endIndex;
Actual results (实际的结果)
Pagination组件endIndex计算错误
Remarks (补充说明)
The text was updated successfully, but these errors were encountered: