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 092606fdf..7beb76fdc 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -72,9 +72,9 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll 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); |
