title: UI Grid showing only last record many times on infinite scroll
body: <p><a href="https://i.stack.imgur.com/LDA9k.png" rel="nofollow noreferrer">Before Scrolling</a></p>
  
  <p><a href="https://i.stack.imgur.com/CqOf0.png" rel="nofollow noreferrer">After Scrolling</a></p>
  
  <p>In Grid on first time load I am getting data properly.
  After scrolling down it is getting problem.
  It displays last record from the first load's last record in every row.</p>
  
  <p>Below is my code for infinite scroll function.</p>
  
  <pre><code>$scope.getDataDown = function() {
    var promise = $q.defer();
    $scope.lastPage++;
    if ($scope.data.length &lt; $scope.total) {
      $http(getRequest()).success(function(data) {
        promise.resolve();
        var jb = JSON.stringify(data.content);
        $scope.gridApi.infiniteScroll.saveScrollPercentage();
        $scope.data = $scope.data.concat(data.content);
        $scope.total = data.total ? data.total : data.length;
        $scope.length = $scope.data.length;
        $scope.gridApi.infiniteScroll.dataLoaded(false,
            $scope.lastPage &lt; ($scope.total / $scope.pageSize));
      }).error(function(error) {
            $scope.gridApi.infiniteScroll.dataLoaded();
          });
    }
    return promise.promise;
  };
  </code></pre>