aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionTreeView.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-02-20 20:26:36 -0500
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-02-20 20:26:36 -0500
commiteff29ee31afdaf683fbd33d84833872c027c8a6c (patch)
tree23eade31af8ad70b8466cbce83769fde76900471 /src/client/views/collections/CollectionTreeView.tsx
parentc2bcb4ac83ecafb0bf23f72ed1bc2d05b877da6d (diff)
parenta2abfb07b783769094414c39e300b88c31cfc450 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into filters
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx2
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);