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

[Feature request]: NDataTable pagination prefix support total items #585

Closed
cnguu opened this issue Jul 22, 2021 · 6 comments · Fixed by #644
Closed

[Feature request]: NDataTable pagination prefix support total items #585

cnguu opened this issue Jul 22, 2021 · 6 comments · Fixed by #644
Assignees
Labels
feature request New feature or request

Comments

@cnguu
Copy link

cnguu commented Jul 22, 2021

This function solves the problem (这个功能解决的问题)

Total number of items displayed

Expected API (期望的 API)

pagination: {
        page: 1,
        pageSize: 15,
        pageSizes: [15, 25, 50, 100],
        pageCount: 101,
        showQuickJumper: true,
        showSizePicker: true,
            prefix: (info) => {
              // here, `info.total`
              return `${info.startIndex + 1}-${
                info.endIndex + 1
              } item / total: ${info.total||0}`;
            },
      },
@github-actions github-actions bot added the feature request New feature or request label Jul 22, 2021
@Talljack
Copy link
Contributor

Total information will not be available in asynchronous state

@07akioni
Copy link
Collaborator

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

@Talljack
Copy link
Contributor

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

@07akioni
Copy link
Collaborator

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

In non-remote mode, we should fill it for user by data.length

@Talljack
Copy link
Contributor

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

In non-remote mode, we should fill it for user by data.length

In non-remote mode, we should fill it for user by data.length
In remote mode, user fill it by itemCount

@07akioni
Copy link
Collaborator

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

In non-remote mode, we should fill it for user by data.length

In non-remote mode, we should fill it for user by data.length
In remote mode, user fill it by itemCount

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants