ItemsPerPage cannot be changed dynamically
Hi all,
I have a question about changing the amount of items per page, because I have some problems with it. But what is the best solution to change the amount manually with an input dropdown. At the moment I made a EventEmitter and have a function that changes the var itemPerPage, It worked for the first per page, but when I navigate (with the pagination) the amount it's not right.
What I found out is that the amount of items at the last page is correct, but when I navigate one page in the opposite direction(and further) the amount of items shown is (total of pages - current page) * itemPerPage.
I hope someone can help me out, Kind Regards
when you assign value of itemPerPage. Than make sure that you called onTableChange Function. Because at time of value changed in the variable it will not re-render the html. whenever you changed the any of variable or item related to table you need to re-render the html. for this
onTableChanged(this.config)
I hope this will work you. It's been working for me.
as mentioned above i assigned value to itemPerPage from input dropdown and called onChangeTable function ,but navigating to next pages gave strange result with me .. i was missing casting string value from dropdown into integer ,fianally solved ...