mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 04:26:30 +08:00
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)
|
observerRef.current.observe(anchorRef.current)
|
||||||
}
|
}
|
||||||
return () => observerRef.current?.disconnect()
|
return () => observerRef.current?.disconnect()
|
||||||
}, [anchorRef, isLoading])
|
}, [anchorRef, isLoading, dataSourceStore])
|
||||||
|
|
||||||
const isAllLoading = isLoading && fileList.length === 0 && keywords.length === 0
|
const isAllLoading = isLoading && fileList.length === 0 && keywords.length === 0
|
||||||
const isPartialLoading = isLoading && fileList.length > 0
|
const isPartialLoading = isLoading && fileList.length > 0
|
||||||
|
|||||||
@ -51,7 +51,7 @@ const Datasets = ({
|
|||||||
observerRef.current.observe(anchorRef.current)
|
observerRef.current.observe(anchorRef.current)
|
||||||
}
|
}
|
||||||
return () => observerRef.current?.disconnect()
|
return () => observerRef.current?.disconnect()
|
||||||
}, [anchorRef])
|
}, [anchorRef, hasNextPage, isFetching, fetchNextPage])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user