From 40971c01df7063073dfe3a5240da5053e094b45d Mon Sep 17 00:00:00 2001
From: anika-ahluwalia <anika.ahluwalia@gmail.com>
Date: Wed, 19 Aug 2020 00:25:15 -0500
Subject: fixed link label cut off

---
 .../views/collections/CollectionSchemaMovableTableHOC.tsx     | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'src/client/views/collections/CollectionSchemaMovableTableHOC.tsx')

diff --git a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx b/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
index 37e6c115d..e14cd1f4c 100644
--- a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
+++ b/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
@@ -14,6 +14,8 @@ import { DocumentManager } from "../../util/DocumentManager";
 import { SchemaHeaderField } from "../../../fields/SchemaHeaderField";
 import { undoBatch } from "../../util/UndoManager";
 import { SnappingManager } from "../../util/SnappingManager";
+import { SelectionManager } from "../../util/SelectionManager";
+import { DocumentView } from "../nodes/DocumentView";
 
 library.add(faGripVertical, faTrash);
 
@@ -226,12 +228,21 @@ export class MovableRow extends React.Component<MovableRowProps> {
 
     render() {
         const { children = null, rowInfo } = this.props;
+
         if (!rowInfo) {
             return <ReactTableDefaults.TrComponent>{children}</ReactTableDefaults.TrComponent>;
         }
 
         const { original } = rowInfo;
         const doc = FieldValue(Cast(original, Doc));
+        if (doc) {
+            const docView = DocumentManager.Instance.getDocumentViews(doc);
+
+            if (this.props.rowFocused && docView.length) {
+                SelectionManager.SelectDoc(docView[0], false);
+            }
+        }
+
         if (!doc) return <></>;
 
         const reference = React.createRef<HTMLDivElement>();
-- 
cgit v1.2.3-70-g09d2

