From 52007476ccd76061d90e30b2eba7dc1978ff2aec Mon Sep 17 00:00:00 2001 From: moeyang13 Date: Mon, 31 Jul 2023 11:46:16 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20don't=20call=20needLoadMo?= =?UTF-8?q?reData=20on=20last=20row=20with=20cellNav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unable to edit the last row if both cellNav and infiniteScroll were present (caused infinte refresh loop with scrollDown) --- packages/infinite-scroll/src/js/infinite-scroll.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/infinite-scroll/src/js/infinite-scroll.js b/packages/infinite-scroll/src/js/infinite-scroll.js index be09eaf5f8..ec7dcdba20 100644 --- a/packages/infinite-scroll/src/js/infinite-scroll.js +++ b/packages/infinite-scroll/src/js/infinite-scroll.js @@ -333,11 +333,14 @@ grid.infiniteScroll.direction = grid.scrollDirection; delete grid.infiniteScroll.prevScrollTop; - if (grid.scrollDirection === uiGridConstants.scrollDirection.UP && grid.infiniteScroll.scrollUp ) { + if (grid.scrollDirection === uiGridConstants.scrollDirection.UP && grid.infiniteScroll.scrollUp) { grid.infiniteScroll.dataLoading = true; grid.api.infiniteScroll.raise.needLoadMoreDataTop(); } - else if (grid.scrollDirection === uiGridConstants.scrollDirection.DOWN && grid.infiniteScroll.scrollDown ) { + else if (grid.scrollDirection === uiGridConstants.scrollDirection.DOWN && grid.infiniteScroll.scrollDown) { + if (grid.cellNav && grid.cellNav.lastRowCol && grid.cellNav.lastRowCol.row.index === grid.infiniteScroll.previousVisibleRows - 1) { + return; + } grid.infiniteScroll.dataLoading = true; grid.api.infiniteScroll.raise.needLoadMoreData(); }