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(() => {
|
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(() => {
|
const endRecord = computed(() => {
|
||||||
@@ -91,7 +92,7 @@ function getButtonClass(pageNumber: number) {
|
|||||||
<!-- Info text -->
|
<!-- Info text -->
|
||||||
<div v-if="showInfo && endRecord > 0" class="text-sm text-muted-foreground shrink-0">
|
<div v-if="showInfo && endRecord > 0" class="text-sm text-muted-foreground shrink-0">
|
||||||
Menampilkan {{ startRecord }}
|
Menampilkan {{ startRecord }}
|
||||||
hingga {{ endRecord }}
|
hingga {{ Number(endRecord).toLocaleString('id-ID') }}
|
||||||
dari {{ formattedRecordCount }} data
|
dari {{ formattedRecordCount }} data
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="shrink-0">-</div>
|
<div v-else class="shrink-0">-</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user