mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-15 10:05:53 +08:00
Fix: InfiniteScroll sometimes can not fetch next page (#7550)
### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/7538 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
514c08a932
commit
4a891f2d67
@ -70,15 +70,29 @@ const FlowList = () => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
|
<div
|
||||||
|
id="scrollableDiv"
|
||||||
|
style={{
|
||||||
|
height: 'calc(100vh - 200px)',
|
||||||
|
overflow: 'auto',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
dataLength={nextList?.length ?? 0}
|
dataLength={nextList?.length ?? 0}
|
||||||
next={fetchNextPage}
|
next={fetchNextPage}
|
||||||
hasMore={hasNextPage}
|
hasMore={hasNextPage}
|
||||||
loader={<Skeleton avatar paragraph={{ rows: 1 }} active />}
|
loader={<Skeleton avatar paragraph={{ rows: 1 }} active />}
|
||||||
endMessage={!!total && <Divider plain>{t('noMoreData')} 🤐</Divider>}
|
endMessage={
|
||||||
|
!!total && <Divider plain>{t('noMoreData')} 🤐</Divider>
|
||||||
|
}
|
||||||
scrollableTarget="scrollableDiv"
|
scrollableTarget="scrollableDiv"
|
||||||
|
scrollThreshold="200px"
|
||||||
|
>
|
||||||
|
<Flex
|
||||||
|
gap={'large'}
|
||||||
|
wrap="wrap"
|
||||||
|
className={styles.flowCardContainer}
|
||||||
>
|
>
|
||||||
<Flex gap={'large'} wrap="wrap" className={styles.flowCardContainer}>
|
|
||||||
{nextList.length > 0 ? (
|
{nextList.length > 0 ? (
|
||||||
nextList.map((item) => {
|
nextList.map((item) => {
|
||||||
return <FlowCard item={item} key={item.id}></FlowCard>;
|
return <FlowCard item={item} key={item.id}></FlowCard>;
|
||||||
@ -88,6 +102,7 @@ const FlowList = () => {
|
|||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
|
</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
{flowSettingVisible && (
|
{flowSettingVisible && (
|
||||||
<AgentTemplateModal
|
<AgentTemplateModal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user