fix: some review changes

This commit is contained in:
Ramesh Mane
2025-03-05 14:51:14 +00:00
parent 72315bb0bd
commit 19b127e09b
10 changed files with 19 additions and 295 deletions

View File

@@ -109,6 +109,7 @@ export default function convertCellData(
attachments.push(attachment)
}
// Todo: on paste file add it don't replace
if (oldAttachments.length && !attachments.length) {
return undefined
} else if (value && attachments.length) {
@@ -119,12 +120,12 @@ export default function convertCellData(
...att,
title: populateUniqueFileName(
att?.title,
[...oldAttachments, ...newAttachments].map((fn) => fn?.title || fn?.fileName),
oldAttachments.concat(newAttachments).map((fn) => fn?.title || fn?.fileName),
att?.mimetype,
),
})
}
return JSON.stringify([...oldAttachments, ...newAttachments])
return JSON.stringify(oldAttachments.concat(newAttachments))
} else if (files.length && attachments.length) {
return attachments
} else {