페이징 방어코드 추가
This commit is contained in:
@@ -75,6 +75,7 @@ export const CashReceiptListPage = () => {
|
||||
if(entry.isIntersecting){
|
||||
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||
if(onActionIntersect && !!pageParam.cursor){
|
||||
setOnActionIntersect(false);
|
||||
callList('page');
|
||||
}
|
||||
}
|
||||
@@ -124,6 +125,7 @@ export const CashReceiptListPage = () => {
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
@@ -139,6 +141,7 @@ export const CashReceiptListPage = () => {
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user