angular-vs-repeat
angular-vs-repeat copied to clipboard
Support to scroll to a particular item
In previous versions there was the vsScrollSetting attribute that had the scrollIndex property to go to a particular item. But this feature was removed in newer versions and there is no substitute for it.
Proposed solution:
$scope.$on('vsScrollToItem', function(event, index) {
if(scrollPos=='scrollTop')
$scrollParent.scrollTop($scope.sizesCumulative[index]);
else
$scrollParent.scrollLeft($scope.sizesCumulative[index]);
});
See https://github.com/kamilkp/angular-vs-repeat/issues/144