Skip to content

Commit 9f7b444

Browse files
committed
item interpolation bindings fix
1 parent d510726 commit 9f7b444

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/ui-scroll.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ angular.module('ui.scroll', [])
208208
}
209209
});
210210
if (!pending.length) {
211-
adjustBuffer();
211+
$timeout(() => adjustBuffer());
212212
}
213213
}
214214
}
@@ -333,7 +333,7 @@ angular.module('ui.scroll', [])
333333
let updates = updateDOM();
334334

335335
// We need the item bindings to be processed before we can do adjustment
336-
$timeout(() => {
336+
$scope.$apply(() => $timeout(() => {
337337

338338
// show elements after data binging has been done
339339
updates.inserted.forEach(w => w.element.removeClass('ng-hide'));
@@ -349,15 +349,14 @@ angular.module('ui.scroll', [])
349349
if (!pending.length) {
350350
adapter.calculateProperties();
351351
}
352-
});
352+
}));
353353
}
354354

355355
function adjustBufferAfterFetch(rid) {
356356
let updates = updateDOM();
357357

358358
// We need the item bindings to be processed before we can do adjustment
359-
$timeout(() => {
360-
359+
$scope.$apply(() => $timeout(() => {
361360
// show elements after data binging has been done
362361
updates.inserted.forEach(w => w.element.removeClass('ng-hide'));
363362
updates.prepended.forEach(w => w.element.removeClass('ng-hide'));
@@ -379,7 +378,7 @@ angular.module('ui.scroll', [])
379378
bindEvents();
380379
adapter.calculateProperties();
381380
}
382-
});
381+
}));
383382
}
384383

385384
function fetch(rid) {

0 commit comments

Comments
 (0)