Skip to content

Commit fbca412

Browse files
authored
Merge pull request #4519 from nkoterba/fix_doc
fix(infinite-scroll): Remove returns of adjustInfiniteScrollPosition.
2 parents 5b6b8ef + 156665f commit fbca412

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/features/infinite-scroll/js/infinite-scroll.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,11 @@
125125
* infinite scroll events upward
126126
* @param {boolean} scrollDown flag that there are pages downwards, so
127127
* fire infinite scroll events downward
128-
* @returns {promise} promise that is resolved when the scroll reset is complete
129128
*/
130129
resetScroll: function( scrollUp, scrollDown ) {
131130
service.setScrollDirections( grid, scrollUp, scrollDown);
132131

133-
return service.adjustInfiniteScrollPosition(grid, 0);
132+
service.adjustInfiniteScrollPosition(grid, 0);
134133
},
135134

136135

@@ -414,7 +413,6 @@
414413
* @description This function fires 'needLoadMoreData' or 'needLoadMoreDataTop' event based on scrollDirection
415414
* @param {Grid} grid the grid we're working on
416415
* @param {number} scrollTop the position through the grid that we want to scroll to
417-
* @returns {promise} a promise that is resolved when the scrolling finishes
418416
*/
419417
adjustInfiniteScrollPosition: function (grid, scrollTop) {
420418
var scrollEvent = new ScrollEvent(grid, null, null, 'ui.grid.adjustInfiniteScrollPosition'),
@@ -448,7 +446,6 @@
448446
* infinite scroll events upward
449447
* @param {boolean} scrollDown flag that there are pages downwards, so
450448
* fire infinite scroll events downward
451-
* @returns {promise} a promise that is resolved when the scrolling finishes
452449
*/
453450
dataRemovedTop: function( grid, scrollUp, scrollDown ) {
454451
var newVisibleRows, oldTop, newTop, rowHeight;
@@ -462,7 +459,7 @@
462459
// of rows removed
463460
newTop = oldTop - ( grid.infiniteScroll.previousVisibleRows - newVisibleRows )*rowHeight;
464461

465-
return service.adjustInfiniteScrollPosition( grid, newTop );
462+
service.adjustInfiniteScrollPosition( grid, newTop );
466463
},
467464

468465
/**
@@ -485,7 +482,7 @@
485482

486483
newTop = grid.infiniteScroll.prevScrollTop;
487484

488-
return service.adjustInfiniteScrollPosition( grid, newTop );
485+
service.adjustInfiniteScrollPosition( grid, newTop );
489486
}
490487
};
491488
return service;

0 commit comments

Comments
 (0)