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"
@current-change="onPageChange"
@items-per-page-change="onItemsPerPageChange"
:rowsPerPage="items"
>
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.