Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: InfiniteScroll sometimes can not fetch next page (#7550)

Stephen Hu4a891f2d6727
diff --git a/web/src/pages/flow/list/index.tsx b/web/src/pages/flow/list/index.tsx
index ce478b2a1d..0c624e65fc 100644
--- a/web/src/pages/flow/list/index.tsx
+++ b/web/src/pages/flow/list/index.tsx
@@ -70,24 +70,39 @@ const FlowList = () => {
</Flex>
<Spin spinning={loading}>
- <InfiniteScroll
- dataLength={nextList?.length ?? 0}
- next={fetchNextPage}
- hasMore={hasNextPage}
- loader={<Skeleton avatar paragraph={{ rows: 1 }} active />}
- endMessage={!!total && <Divider plain>{t('noMoreData')} 🤐</Divider>}
- scrollableTarget="scrollableDiv"
+ <div
+ id="scrollableDiv"
+ style={{
+ height: 'calc(100vh - 200px)',
+ overflow: 'auto',
+ }}
>
- <Flex gap={'large'} wrap="wrap" className={styles.flowCardContainer}>
- {nextList.length > 0 ? (
- nextList.map((item) => {
- return <FlowCard item={item} key={item.id}></FlowCard>;
- })
- ) : (
- <Empty className={styles.knowledgeEmpty}></Empty>
- )}
- </Flex>
- </InfiniteScroll>
+ <InfiniteScroll
+ dataLength={nextList?.length ?? 0}
+ next={fetchNextPage}
+ hasMore={hasNextPage}
+ loader={<Skeleton avatar paragraph={{ rows: 1 }} active />}
+ endMessage={
+ !!total && <Divider plain>{t('noMoreData')} 🤐</Divider>
+ }
+ scrollableTarget="scrollableDiv"
+ scrollThreshold="200px"
+ >
+ <Flex
+ gap={'large'}
+ wrap="wrap"
+ className={styles.flowCardContainer}
+ >
+ {nextList.length > 0 ? (
+ nextList.map((item) => {
+ return <FlowCard item={item} key={item.id}></FlowCard>;
+ })
+ ) : (
+ <Empty className={styles.knowledgeEmpty}></Empty>
+ )}
+ </Flex>
+ </InfiniteScroll>
+ </div>
</Spin>
{flowSettingVisible && (
<AgentTemplateModal