kamilkp / angular-vs-repeat

Virtual Scroll for AngularJS ngRepeat directive
http://kamilkp.github.io/angular-vs-repeat/
MIT License
818 stars 228 forks source link

issues with scroll parent #166

Open giannifrey opened 7 years ago

giannifrey commented 7 years ago

I can't get vs-scroll-parent to work unless it's set to window. Digging a bit into the issue it seems that angular.element.prototype.closest returns a single element (used on line 89 in angular-vs-repeat.js), whereas the code generally expects that $scrollParent is an array, particularly an angular.element() array. Whenever the code calls $scrollParent[0] we then get null, and the script fails.

any suggestions how to fix / work around?

Thanks! Gianni

dmartinho commented 5 years ago

I stumble on the same issue. It seems when you used ui-select they define a closest method which return an element and not a jqLite element (like in the angular-vs-repeat implementation).