Просмотр исходного кода

Merge pull request #3501 from overleaf/ta-file-tree-linked

[ReactFileTree] Pass All attributes in entity:selected Event

GitOrigin-RevId: c05864784618a0bfe6b5d9553c56513888c71156
Timothée Alby 5 лет назад
Родитель
Сommit
2f178f3aa9

+ 1 - 1
services/web/frontend/js/features/file-tree/controllers/file-tree-controller.js

@@ -46,8 +46,8 @@ App.controller('ReactFileTreeController', function(
       const type =
         selectedEntity.type === 'fileRef' ? 'file' : selectedEntity.type
       $scope.$emit('entity:selected', {
+        ...selectedEntity.entity,
         id: selectedEntity.entity._id,
-        name: selectedEntity.entity.name,
         type
       })