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

Display correct pagination information in server mode #72

Open
mat813 opened this issue Sep 17, 2019 · 1 comment
Open

Display correct pagination information in server mode #72

mat813 opened this issue Sep 17, 2019 · 1 comment

Comments

@mat813
Copy link

mat813 commented Sep 17, 2019

Right now, if I search for something, I will get, for example,

From 1 to 12 of 411 entries (411 total records)

It would be nice to be able to get a way to pass the number of filtered records too, so that I could get:

From 1 to 12 of 12 entries (411 total records)

My JSON endpoint is already returning a filtered count, so I would simply need to hook it into vbt.

@mat813
Copy link
Author

mat813 commented Sep 20, 2019

Ok, I overrode the pagination-info slot with:

<template slot="pagination-info" slot-scope="props">
  <div class="text-right justify-content-center">
    <template v-if="props.currentPageRowsLength != 0">From 1 to {{props.currentPageRowsLength}} of {{filtered_rows}} entries</template>
    <template v-else="v-else">No results found</template>
    <template> ({{props.originalRowsLength}} total records)</template>
  </div>
</template>

But it feels a bit dirty using props.stuff and local variables.

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

No branches or pull requests

1 participant