mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-05 06:09:20 +00:00
Merge pull request #3419 from overleaf/ta-select-file-type-fix
[ReactFileTree] Fix File Type for `entity:selected` Event GitOrigin-RevId: 61f6746048931c1729ff640ef89eb78cf3de2723
This commit is contained in:
parent
6eeb7857e3
commit
1791673d41
1 changed files with 3 additions and 1 deletions
|
@ -43,10 +43,12 @@ App.controller('ReactFileTreeController', function(
|
|||
$scope.onSelect = selectedEntities => {
|
||||
if (selectedEntities.length === 1) {
|
||||
const selectedEntity = selectedEntities[0]
|
||||
const type =
|
||||
selectedEntity.type === 'fileRef' ? 'file' : selectedEntity.type
|
||||
$scope.$emit('entity:selected', {
|
||||
id: selectedEntity.entity._id,
|
||||
name: selectedEntity.entity.name,
|
||||
type: selectedEntity.type
|
||||
type
|
||||
})
|
||||
|
||||
// in the react implementation there is no such concept as "1
|
||||
|
|
Loading…
Reference in a new issue