Hi,
I want my datatable to show at the bottom "Showing 1 to 10 of 50 entries" for example. I see its available in your non-vue examples, but I dont see a way to enable that in the vue demo 1 or 2.
Is there some snippet of code you could provide that I can add it in manually?
Thank you,
Chris
Hi Chris,
Showing entries text isn't included in our Vue component at the moment, we will consider including this in the next releases.
To include this now you can update component src/components/kt-datatable/KTDataTable.vue and include markup for this text.
<div >Showing {{ currentPageTotal - (itemsPerPage - 1) }} to {{ currentPageTotal }} of {{ data.length }} records</div>
const currentPageTotal = computed(() => {
return currentPage.value * itemsInTable.value;
});
AWESOME - thanks a lot Lauris!
Hi Chris,
Glad to hear that. All the best with your project!
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Hi Lauris,
I noticed that this doesnt work properly. If I change the number of results per page to lets say 50, it shows:
Showing 41 to 50 of 1 records
Hi Chris,
It seems like my previous solution does not handle cases when you filter data and change itemPerPage value.
We are working now on an implementation for this into our component, we will include this feature in the next releases.
Stay tuned for updates via https://twitter.com/keenthemes and https://www.instagram.com/keenthemes/
Regards,
Lauris Stepanovs,
Keenthemes Support Team