Hi,
I tried doing this, But when ever i add the my datatable lists all the items from the array instead of 10 or the selected rowsPerPage, i tried passing the rowsPerPage prop, but when ever i add the events the props aren't working.
<datatable :table-data="tableData" :table-header="tableHeader" :enable-items-per-page-dropdown="true" :rowsperpage="items">
</datatable>
const rowsPerPage = ref(5);
const onItemsPerPageChange = (itemsPerPage) => {
console.log(itemsPerPage);
rowsPerPage.value = itemsPerPage
};
Hi,
The problem is that you are setting variable rowsPerPage and then you do not use it.
You need to pass rowsPerPage variable into a :rowsPerPage prop instead of items.