페이징 방어코드 추가
This commit is contained in:
@@ -39,6 +39,7 @@ export const FaqListPage = () => {
|
||||
if(entry.isIntersecting){
|
||||
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||
if(onActionIntersect && !!pageParam.cursor){
|
||||
setOnActionIntersect(false);
|
||||
callList('page');
|
||||
}
|
||||
}
|
||||
@@ -76,6 +77,7 @@ export const FaqListPage = () => {
|
||||
setResultList(rs.content);
|
||||
}
|
||||
if(rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
@@ -91,6 +93,7 @@ export const FaqListPage = () => {
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
|
||||
@@ -39,6 +39,7 @@ export const NoticeListPage = () => {
|
||||
if(entry.isIntersecting){
|
||||
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||
if(onActionIntersect && !!pageParam.cursor){
|
||||
setOnActionIntersect(false);
|
||||
callList('page');
|
||||
}
|
||||
}
|
||||
@@ -76,6 +77,7 @@ export const NoticeListPage = () => {
|
||||
setResultList(rs.content);
|
||||
}
|
||||
if(rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
@@ -91,6 +93,7 @@ export const NoticeListPage = () => {
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
|
||||
@@ -43,6 +43,7 @@ export const QnaListPage = () => {
|
||||
if(entry.isIntersecting){
|
||||
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||
if(onActionIntersect && !!pageParam.cursor){
|
||||
setOnActionIntersect(false);
|
||||
callList('page');
|
||||
}
|
||||
}
|
||||
@@ -78,6 +79,7 @@ export const QnaListPage = () => {
|
||||
setResultList(rs.content);
|
||||
}
|
||||
if(rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
@@ -93,6 +95,7 @@ export const QnaListPage = () => {
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user