avoid unnecessary infinite scroll loadUntilFull calls

allow the dom to update before checking if more data is needed
This commit is contained in:
Brian Gough 2015-02-13 15:53:59 +00:00
parent f037c466cd
commit c29714f427

View file

@ -26,7 +26,9 @@ define [
if (listShorterThanContainer() or atEndOfListView()) and not scope.$eval(attrs.infiniteScrollDisabled)
promise = scope.$eval(attrs.infiniteScroll)
promise.then () ->
setTimeout () ->
loadUntilFull()
, 0
element.on "scroll", (event) ->
loadUntilFull()