Closed mohamedhendy closed 8 months ago
Hi ,
We have default pageSize = 10, so you have to set it to 20 like :pageSize="20" after this changes will works.
Also you can find all demos from the below link where all demos are in server side. https://vue3-datatable-document.vercel.app/
I copied and past your code
https://vue3-datatable-document.vercel.app/advanced
https://github.com/bhaveshpatel200/vue3-datatable-document/blob/main/pages/advanced.vue
and this is the result
for your information, I am using nuxt3
the problem as I told you "totalRows" props not working
this is code `
<template #firstName="data">
<div class="flex items-center gap-2">
<img :src="`/assets/images/profile/profile-${getRandomNumber(1, 32)}.jpeg`" class="w-9 h-9 rounded-full max-w-none" alt="user-profile" />
<div class="font-semibold">{{ data.value.firstName + ' ' + data.value.lastName }}</div>
</div>
</template>
<template #country>
<div class="flex items-center gap-2">
<img width="24" :src="`/assets/images/flags/${getCountry().code}.svg`" class="max-w-none" alt="user profile" />
<div class="text-gray-600">{{ getCountry().name }}</div>
</div>
</template>
<template #email="data">
<a :href="`mailto:${data.value.email}`" class="text-primary hover:underline">{{ data.value.email }}</a>
</template>
<template #age>
<div class="progress-bar">
<div class="progress-line" :style="`width:${getRandomNumber(15, 100)}%; background-color:${randomColor()}`"></div>
</div>
</template>
<template #rating="data">
<div class="flex items-center justify-center text-warning">
<div v-for="i in getRandomNumber(1, 5)" :key="i + data.value.id">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="#e2a03f"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-star f-icon-line"
>
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
</svg>
</div>
</div>
</template>
<template #series="data">
<div style="width: 150px">
<client-only>
</client-only>
</div>
</template>
<template #status>
<span class="badge" :class="[randomStatusColor()]">{{ randomStatus() }}</span>
</template>
</vue3-datatable>
</div>
`
Hi,
Not sure what's problem at your side, but you can see all type of our demos including as like yours working fine.
despite props "totalRows"equaling 20 it still shows on pagination "showing 1 to 10 of 10 results" the right result should be "showing 1 to 10 of 20results"
in addition to I can't go to page 2
`