From d790d2bc89f0f87439dc7cee4fed18c50ed1e77f Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 16 Sep 2025 13:37:49 +0800 Subject: [PATCH] refactor: Enhance dependency tracking in List components for improved loading state management --- .../data-source/online-drive/file-list/list/index.tsx | 2 +- web/app/components/datasets/list/datasets.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/index.tsx index cdc7b67bdb..f21f65904b 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/index.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/index.tsx @@ -44,7 +44,7 @@ const List = ({ observerRef.current.observe(anchorRef.current) } return () => observerRef.current?.disconnect() - }, [anchorRef, isLoading]) + }, [anchorRef, isLoading, dataSourceStore]) const isAllLoading = isLoading && fileList.length === 0 && keywords.length === 0 const isPartialLoading = isLoading && fileList.length > 0 diff --git a/web/app/components/datasets/list/datasets.tsx b/web/app/components/datasets/list/datasets.tsx index beb4e591e1..69ea395795 100644 --- a/web/app/components/datasets/list/datasets.tsx +++ b/web/app/components/datasets/list/datasets.tsx @@ -51,7 +51,7 @@ const Datasets = ({ observerRef.current.observe(anchorRef.current) } return () => observerRef.current?.disconnect() - }, [anchorRef]) + }, [anchorRef, hasNextPage, isFetching, fetchNextPage]) return ( <>