mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 06:14:37 +00:00
Merge pull request #3485 from overleaf/ta-file-tree-upload-fix
[ReactFileTree] Fix Upload Button When No Entities Are Selected GitOrigin-RevId: d7438ccee741c21190deaddc376c6f394870de42
This commit is contained in:
parent
16a715c816
commit
d8469953f1
1 changed files with 5 additions and 4 deletions
|
@ -248,10 +248,11 @@ export function useFileTreeActionable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function startUploadingDocOrFile() {
|
function startUploadingDocOrFile() {
|
||||||
const selectedEntityId = Array.from(selectedEntityIds)[0]
|
const parentFolderId = getSelectedParentFolderId(
|
||||||
const found = findInTreeOrThrow(fileTreeData, selectedEntityId)
|
fileTreeData,
|
||||||
const parentFolderId =
|
selectedEntityIds
|
||||||
found.type === 'folder' ? found.entity._id : found.parentFolderId
|
)
|
||||||
|
|
||||||
window.dispatchEvent(
|
window.dispatchEvent(
|
||||||
new CustomEvent('FileTreeReactBridge.openNewDocModal', {
|
new CustomEvent('FileTreeReactBridge.openNewDocModal', {
|
||||||
detail: {
|
detail: {
|
||||||
|
|
Loading…
Reference in a new issue