Merge pull request #6958 from overleaf/ta-file-tree-selection-flat-3

Explicitly Distinguish Docs and Files

GitOrigin-RevId: 90738dd47b36342aed0eaf46a3842042d9d0f4b6
This commit is contained in:
Timothée Alby 2022-03-02 10:02:47 +01:00 committed by Copybot
parent 264b107e39
commit f8988e8087

View file

@ -13,6 +13,7 @@ function FileTreeFolderList({
dropRef = null,
children,
}) {
files = files.map(file => ({ ...file, isFile: true }))
const docsAndFiles = [...docs, ...files]
return (
@ -40,7 +41,7 @@ function FileTreeFolderList({
key={doc._id}
name={doc.name}
id={doc._id}
isFile={doc.linkedFileData !== undefined}
isFile={doc.isFile}
isLinkedFile={doc.linkedFileData && !!doc.linkedFileData.provider}
/>
)