mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-07 02:55:08 +08:00
Fix: parser bug (#13014)
…, clicking "Parse" will still ask if you want to clear the chunks of the already parsed files. ### What problem does this PR solve? Fix: After selecting all and then unchecking the already parsed files, clicking "Parse" will still ask if you want to clear the chunks of the already parsed files. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -44,10 +44,12 @@ export function useBulkOperateDataset({
|
|||||||
if (!documents.length) {
|
if (!documents.length) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return documents.reduce((acc, cur) => {
|
return documents
|
||||||
return acc + cur.chunk_num;
|
.filter((item) => selectedRowKeys.includes(item.id) && item.id)
|
||||||
}, 0);
|
?.reduce((acc, cur) => {
|
||||||
}, [documents]);
|
return acc + cur.chunk_num;
|
||||||
|
}, 0);
|
||||||
|
}, [documents, selectedRowKeys]);
|
||||||
|
|
||||||
const runDocument = useCallback(
|
const runDocument = useCallback(
|
||||||
async (run: number, option?: { delete: boolean; apply_kb: boolean }) => {
|
async (run: number, option?: { delete: boolean; apply_kb: boolean }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user