Use Infinite loadmore() + search


#1

Hi all,
i like to ask izzit possible to add infinite item with search ?
i have done infinite load with json data but my search filter cannot read the last data that no yet to load.

sorry for my bad english

thank.


#2

here is my codepen… http://codepen.io/tjmiao22/pen/cxqmv
any solution or suggestion?
really need this function


#3

You could use this approach: http://codepen.io/sunnycyk/pen/gnFyj?editors=101

All data is loaded, however, in ng-repeat only few are rendered. And you can put your search that will reach the data that is not visualized. That worked for me.


#4

Hi, i tried your suggestion. This way for infinite scrolling works just fine for me, but when i try to search the results, it’s just only filtering the data displayed so far… Have you got a hint for me?

my html on list item:
ng-repeat="item initems | limitTo:numberOfItemsToDisplay | filter:search track by $index

my code:
$scope.numberOfItemsToDisplay = 3;
$scope.items = Item_list;
$scope.addItems = function() {
if ($scope.items.length > $scope.numberOfItemsToDisplay)
$scope.numberOfItemsToDisplay += 3;
$scope.$broadcast(‘scroll.infiniteScrollComplete’)
}

$scope.addItems()