Skip to content
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 report]: NDataTable pagination prefix endIndex incorrect #584

Closed
cnguu opened this issue Jul 22, 2021 · 0 comments · Fixed by #589
Closed

[Bug report]: NDataTable pagination prefix endIndex incorrect #584

cnguu opened this issue Jul 22, 2021 · 0 comments · Fixed by #589
Assignees
Labels
bug Something isn't working

Comments

@cnguu
Copy link

cnguu commented Jul 22, 2021

TuSimple/naive-ui version (版本)

2.15.5

Vue version (Vue 版本)

3.1.4

Browser and its version (浏览器及其版本)

Chrome(91.0.4472.164)

System and its version (系统及其版本)

Win10 20H2 19042.1110

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/intelligent-ellis-k3oew?file=/src/SDataTable.vue

Reappearance steps (重现步骤)

  1. Look the pagination.prefix

Expected results (期望的结果)

pagination: {
        page: 1,
        pageSize: 15,
        pageSizes: [15, 25, 50, 100],
        pageCount: 101,
        showQuickJumper: true,
        showSizePicker: true,
            prefix: (info) => {
              // endIndex = 14
              return `${info.startIndex   1}-${
                info.endIndex   1
              } item / total: ${info.total||0}`;
            },
      },

Actual results (实际的结果)

pagination: {
        page: 1,
        pageSize: 15,
        pageSizes: [15, 25, 50, 100],
        pageCount: 101,
        showQuickJumper: true,
        showSizePicker: true,
            prefix: (info) => {
              // endIndex = 15
              return `${info.startIndex   1}-${
                info.endIndex   1
              } item / total: ${info.total||0}`;
            },
      },

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Jul 22, 2021
@Talljack Talljack added bug Something isn't working and removed untriaged need to sort labels Jul 22, 2021
@Talljack Talljack self-assigned this Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants