Skip to content

Commit 81d4849

Browse files
author
Nicholas Thomson
committed
Merge conflicts
1 parent 5f1c26b commit 81d4849

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/scripts/controllers/crunchinator.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,12 @@ angular.module('crunchinatorApp.controllers')
176176
$scope.updateLookingFor = function() {
177177
var next_items = [];
178178
var current_count = $scope.lookingForList.length;
179+
var page_size = 100;
179180
if($scope.lookingFor === 'companies') {
180-
next_items = $scope.filteredCompaniesList.slice(current_count, current_count+50);
181+
next_items = $scope.filteredCompaniesList.slice(current_count, current_count+page_size);
181182
}
182183
else if($scope.lookingFor === 'investors') {
183-
next_items = $scope.filteredInvestorsList.slice(current_count, current_count+50);
184+
next_items = $scope.filteredInvestorsList.slice(current_count, current_count+page_size);
184185
}
185186
$scope.lookingForList = $scope.lookingForList.concat(next_items);
186187
};

app/views/main.tpl.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ <h3 class='pull-left'>
4646
</p>
4747
<div class='textlist clear-both'>
4848
<div class='dataset'>
49-
<table class='table table-striped table-hover' infinite-scroll="updateLookingFor()">
49+
<table
50+
class='table table-striped table-hover'
51+
infinite-scroll="updateLookingFor()"
52+
infinite-scroll-distance="2"
53+
>
5054
<tbody>
5155
<tr ng-repeat="item in lookingForList">
5256
<td><a href='#'>{{item.name}}</a></td>

0 commit comments

Comments
 (0)