Closed Safnaj closed 3 years ago
This is intended behavior.
See the index
description in the table under the snippet
https://bootstrap-vue.org/docs/components/table#custom-data-rendering
The row number (indexed from zero) relative to the displayed rows
There's also the note under the table.
index
will not always be the actual row's index number, as it is computed after filtering, sorting and pagination have been applied to the original table data. The index value will refer to the displayed row number. This number will align with the indexes from the optional v-model bound variable.
This is intended behavior.
See the
index
description in the table under the snippet https://bootstrap-vue.org/docs/components/table#custom-data-renderingThe row number (indexed from zero) relative to the displayed rows
There's also the note under the table.
index
will not always be the actual row's index number, as it is computed after filtering, sorting and pagination have been applied to the original table data. The index value will refer to the displayed row number. This number will align with the indexes from the optional v-model bound variable.
Thanks..! Any other way to have the index number as serial for all the pages ??
I guess you could use indexOf
<template #cell(index)="{ item }">
{{ allVouchers.indexOf(item) + 1 }}
</template>
But if you ever apply any sort of filtering/sorting it will go out of order.
<template #cell(index)="{ item }"> {{ allVouchers.indexOf(item) + 1 }} </template>
Thanks..! It's worked.
Describe the bug
I am using btable to display some records to the table with pagination & search. Unfortunately the records have an Auto increment value to display as serial number in the table.
template #cell(index)="data">{{ data.index + 1 }}</template>
by having this record, the row numbers displays well but its starts from again one when i navigate to other pages.Steps to reproduce the bug
from the below screenshot you can see that the index starting from one even in the 4th page.
Expected behavior
The index number should continue when navigation to next pages.
Versions
Libraries:
Environment:
Additional context - Code
Script: