vue-bootstrap4-table icon indicating copy to clipboard operation
vue-bootstrap4-table copied to clipboard

Display correct pagination information in server mode

Open mat813 opened this issue 4 years ago • 1 comments

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 avatar Sep 17 '19 16:09 mat813

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.

mat813 avatar Sep 20 '19 10:09 mat813