Well, here I am again. I solved the last issue by creating a custom filter 
and passing the element (scrolling div) as the comparator.


HTML
ng-repeat="item in main.list | customFilter : search : divScroll track by 
item.id" 


in the scrolling div's directive

.directive('lazyScrollLast', function() {
return function($scope, element, attrs) {
    $scope.divScroll = element; // Reference to itself
            // ...
};
});

Finally in the filter

.filter('customFilter', ['$filter', function($filter) {
 // https://docs.angularjs.org/api/ng/filter/filter
 var defaultFilter = $filter('filter');
 return function(input, param, comp) {
 comp.triggerHandler('scroll');
 // Pass false as the comparator since I'm using it to contain the div 
angular element
 return $filter('filter')(input, param, false);
 };
}]);

This finally forced the scroll when I filter the list.

I think I'm misusing the filter, but it worked and I couldn't find (for 
now) a better solution.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to