mirror of https://github.com/langgenius/dify.git
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
|
||||
return `${count} ${t('datasetDocuments.segment.searchResults', { count })}`
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [isFullDocMode, total, childChunks.length])
|
||||
}, [isFullDocMode, total, childChunks.length, inputValue])
|
||||
|
||||
return (
|
||||
<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 })}`
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [segmentListData?.total, mode, parentMode])
|
||||
}, [segmentListData?.total, mode, parentMode, searchValue, selectedStatus])
|
||||
|
||||
const toggleFullScreen = useCallback(() => {
|
||||
setFullScreen(!fullScreen)
|
||||
|
|
|
|||
Loading…
Reference in New Issue