bhaveshpatel200 / vue3-datatable

vue3-datatable is a powerful component for creating dynamic and customizable data tables. It supports large amounts of data, sorting, pagination, and filtering and highly customizable
MIT License
123 stars 18 forks source link

Key for sequential numbers #8

Closed prasetyo-jeanu closed 1 year ago

prasetyo-jeanu commented 1 year ago

Can you generate keys with sequential numbers rather than just zeros? So as to create a number sequence in the table.

<template #number="data">
     <strong>{{ data.key + 1 }}</strong>
</template>
bhaveshpatel200 commented 1 year ago

Hi,

It's upto you to how to display sequential numbers. so my suggestions is that you can add one id columns which incremental number and display that as sequential numbers which is best ways.

you can check our demos. https://vue3-datatable-document.vercel.app/advanced https://github.com/bhaveshpatel200/vue3-datatable-document/blob/main/pages/advanced.vue

prasetyo-jeanu commented 12 months ago

I think it's better to generate from the frontend than from the backend especially from the database. imagine an autoincrement id database where one row is deleted, or using uuid

bhaveshpatel200 commented 12 months ago

If you are not passing any unique id column then we are taking row index as key for this table and managed. For this time i am thinking that this features is needed, so will think about this in future.

prasetyo-jeanu commented 11 months ago

well, I'll wait pleasantly for this sequence number feature