mirror of https://github.com/langgenius/dify.git
refactor: Enhance dependency tracking in List components for improved loading state management
This commit is contained in:
parent
1e9fce50a1
commit
d790d2bc89
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ const Datasets = ({
|
|||
observerRef.current.observe(anchorRef.current)
|
||||
}
|
||||
return () => observerRef.current?.disconnect()
|
||||
}, [anchorRef])
|
||||
}, [anchorRef, hasNextPage, isFetching, fetchNextPage])
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Reference in New Issue