mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
fix: update dependencies array in useMemo hooks
This commit is contained in:
parent
d5cb3af293
commit
340a052d44
@ -79,9 +79,8 @@ const ChildSegmentList: FC<IChildSegmentCardProps> = ({
|
|||||||
const count = text === '--' ? 0 : total
|
const count = text === '--' ? 0 : total
|
||||||
return `${count} ${t('datasetDocuments.segment.searchResults', { count })}`
|
return `${count} ${t('datasetDocuments.segment.searchResults', { count })}`
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [isFullDocMode, total, childChunks.length])
|
}, [isFullDocMode, total, childChunks.length, inputValue])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames('flex flex-col', contentOpacity, isParagraphMode ? 'p-1 pb-2' : 'px-3 grow')}>
|
<div className={classNames('flex flex-col', contentOpacity, isParagraphMode ? 'p-1 pb-2' : 'px-3 grow')}>
|
||||||
|
|||||||
@ -350,7 +350,7 @@ const Completed: FC<ICompletedProps> = ({
|
|||||||
return `${total} ${t('datasetDocuments.segment.searchResults', { count })}`
|
return `${total} ${t('datasetDocuments.segment.searchResults', { count })}`
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [segmentListData?.total, mode, parentMode])
|
}, [segmentListData?.total, mode, parentMode, searchValue, selectedStatus])
|
||||||
|
|
||||||
const toggleFullScreen = useCallback(() => {
|
const toggleFullScreen = useCallback(() => {
|
||||||
setFullScreen(!fullScreen)
|
setFullScreen(!fullScreen)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user