fix(pagination): format record numbers with locale for indonesia
Apply toLocaleString('id-ID') to startRecord and endRecord to display numbers in Indonesian format
This commit is contained in:
@@ -65,7 +65,8 @@ const formattedRecordCount = computed(() => {
|
||||
})
|
||||
|
||||
const startRecord = computed(() => {
|
||||
return ((props.paginationMeta.page - 1) * props.paginationMeta.pageSize) + 1
|
||||
const start = ((props.paginationMeta.page - 1) * props.paginationMeta.pageSize) + 1
|
||||
return Number(start).toLocaleString('id-ID')
|
||||
})
|
||||
|
||||
const endRecord = computed(() => {
|
||||
@@ -91,7 +92,7 @@ function getButtonClass(pageNumber: number) {
|
||||
<!-- Info text -->
|
||||
<div v-if="showInfo && endRecord > 0" class="text-sm text-muted-foreground shrink-0">
|
||||
Menampilkan {{ startRecord }}
|
||||
hingga {{ endRecord }}
|
||||
hingga {{ Number(endRecord).toLocaleString('id-ID') }}
|
||||
dari {{ formattedRecordCount }} data
|
||||
</div>
|
||||
<div v-else class="shrink-0">-</div>
|
||||
|
||||
Reference in New Issue
Block a user