mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
amend(collectionRepeat): make sure it properly resizes on scroll
This commit is contained in:
6
js/angular/directive/collectionRepeat.js
vendored
6
js/angular/directive/collectionRepeat.js
vendored
@@ -225,10 +225,8 @@ function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$r
|
||||
|
||||
// Wait for this digest to end before refreshing everything.
|
||||
$timeout(function() {
|
||||
if (newValue.length) {
|
||||
refreshDimensions();
|
||||
}
|
||||
getRepeatManager().refreshData(newValue);
|
||||
if (newValue.length) refreshDimensions();
|
||||
}, 0, false);
|
||||
});
|
||||
|
||||
@@ -493,8 +491,8 @@ function RepeatManagerFactory($rootScope, $window, $$rAF) {
|
||||
|
||||
isDataReady = true;
|
||||
if (isLayoutReady && isDataReady) {
|
||||
scrollView.resize();
|
||||
forceRerender();
|
||||
setTimeout(angular.bind(scrollView, scrollView.resize));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user