aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-09-19 00:11:23 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-09-19 00:11:23 -0400
commitbe5456616a7813572b9fdc9637d4009e7283a46a (patch)
tree0d77a72a8ca136f999a7746ff31811dc88053955 /src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
parent25ea85f7cf2c7f6109eb740ffc111325a39fb745 (diff)
added ContainingCollectionDoc to props that get passed around.
Diffstat (limited to 'src/client/views/collections/CollectionSchemaMovableTableHOC.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaMovableTableHOC.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx b/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
index ec40043cc..39abc41ec 100644
--- a/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
+++ b/src/client/views/collections/CollectionSchemaMovableTableHOC.tsx
@@ -201,12 +201,8 @@ export class MovableRow extends React.Component<MovableRowProps> {
@action
move: DragManager.MoveFunction = (doc: Doc, target: Doc, addDoc) => {
let targetView = DocumentManager.Instance.getDocumentView(target);
- if (targetView) {
- let targetContainingColl = targetView.props.ContainingCollectionView; //.props.ContainingCollectionView.props.Document;
- if (targetContainingColl) {
- let targetContCollDoc = targetContainingColl.props.Document;
- return doc !== target && doc !== targetContCollDoc && this.props.removeDoc(doc) && addDoc(doc);
- }
+ if (targetView && targetView.props.ContainingCollectionDoc) {
+ return doc !== target && doc !== targetView.props.ContainingCollectionDoc && this.props.removeDoc(doc) && addDoc(doc);
}
return doc !== target && this.props.removeDoc(doc) && addDoc(doc);
}