angular-data-table icon indicating copy to clipboard operation
angular-data-table copied to clipboard

Pagination not working when scrollbarV: false

Open meepeek opened this issue 9 years ago • 1 comments

http://codepen.io/anon/pen/ORAmPB

As the above codepen, if I navigate the pages again and again (around 4 times) data changing in the table will stop eventually. It seems like paging function keeps reduce data record in the set.

meepeek avatar Oct 21 '16 08:10 meepeek

ArrayVariable.slice will actually modify the ArrayVariable, changing the dataset you're paging off of each time. You'll want to replace the following.

Before

$scope.paging = function(offset, size) {

    let d = dummyData.slice();

After

$scope.paging = function(offset, size) {
    const dummyDataCopy = angular.copy(dummyData);

    let d = dummyDataCopy.slice();

jonshaffer avatar Oct 28 '16 15:10 jonshaffer