diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-10 18:07:51 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-10 18:07:51 +0530 |
commit | f557c78db9a77812ab398aaff08d9511c1c65fc9 (patch) | |
tree | 69092d21cf97d36842e7eca932e0e19d43447f76 /src/client/views/DocComponent.tsx | |
parent | 3dab659503e98fe75a9c0671057771ff666d7e10 (diff) |
prevented infinite loop in distributeAcls + allowed change of alias x, y, width, height in owned collection + changes to removeDocument calls in many places + comments etc
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r-- | src/client/views/DocComponent.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx index eea133ed9..f453b02b8 100644 --- a/src/client/views/DocComponent.tsx +++ b/src/client/views/DocComponent.tsx @@ -129,7 +129,11 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps, T const toRemove = value.filter(v => docs.includes(v)); // can't assign new List<Doc>(result) to this because you can't assign new values in addonly if (toRemove.length !== 0) { - toRemove.forEach(doc => Doc.RemoveDocFromList(targetDataDoc, this.annotationKey, doc)); + const recent = Cast(Doc.UserDoc().myRecentlyClosed, Doc) as Doc; + toRemove.forEach(doc => { + Doc.RemoveDocFromList(targetDataDoc, this.props.fieldKey, doc); + recent && Doc.AddDocToList(recent, "data", doc, undefined, true, true); + }); return true; } |