diff options
| author | bobzel <zzzman@gmail.com> | 2023-02-28 20:57:01 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-02-28 20:57:01 -0500 |
| commit | 5e7989da274606638c96f649e97e9d1a979956f5 (patch) | |
| tree | 80a10b9a47e9874c3ec8dacdc26210836bbe3fe8 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | f1dea8f31886c1e5e3d8bb772434009803b8fb8a (diff) | |
cleaning up of following inPlace links to overlay current inplaceContainer contents instead of deleting them.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 0477c6a16..78804b070 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -1395,6 +1395,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection ); } addDocTab = action((doc: Doc, where: OpenWhere) => { + if (this.props.isAnnotationOverlay) return this.props.addDocTab(doc, where); switch (where) { case OpenWhere.inParent: return this.props.addDocument?.(doc) || false; @@ -1412,9 +1413,10 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection (!docContext || this.props.removeDocument?.(docContext))) || false ); + case undefined: case OpenWhere.inPlace: if (this.layoutDoc.isInPlaceContainer) { - this.dataDoc[this.props.fieldKey] = new List<Doc>(doc instanceof Doc ? [doc] : doc); + this.layoutDoc[this.props.fieldKey] = new List<Doc>(doc instanceof Doc ? [doc] : doc); return true; } } |
