diff options
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
-rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index 564b41a89..d67fa75e9 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -73,9 +73,9 @@ export class SelectionManager.DeselectAll(); if (result.length !== value.length) { const ind = targetDataDoc[this.props.fieldKey].indexOf(doc); + const prev = ind && targetDataDoc[this.props.fieldKey][ind - 1]; targetDataDoc[this.props.fieldKey] = new List<Doc>(result); if (ind > 0) { - const prev = targetDataDoc[this.props.fieldKey][ind - 1]; FormattedTextBox.SelectOnLoad = prev[Id]; const prevView = DocumentManager.Instance.getDocumentView(prev, this.props.CollectionView); prevView?.select(false); |