vue-bootstrap4-table
vue-bootstrap4-table copied to clipboard
Display correct pagination information in server mode
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.
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.