From 5425b61d62beef22d068e259ae3e2003f08e0c05 Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Mon, 24 Oct 2022 15:06:47 -0400
Subject: switched drag element to show rows

---
 .../views/collections/collectionSchema/SchemaRowBox.tsx    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

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

diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 661056553..66cc3a47a 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -17,9 +17,9 @@ export interface SchemaRowBoxProps extends FieldViewProps {
     columnKeys: string[];
     columnWidths: number[];
     rowMenuWidth: number;
-    selectedRows: ObservableSet<Doc>;
-    selectRow: (e: any, doc: Doc, index: number) => void;
-    startDrag: (e: any, doc: Doc) => boolean;
+    selectedRows: ObservableMap<Doc, HTMLDivElement>;
+    selectRow: (e: any, doc: Doc, ref: HTMLDivElement, index: number) => void;
+    startDrag: (e: any, doc: Doc, ref: HTMLDivElement, index: number) => boolean;
     dragging: boolean;
     dropIndex: (index: number) => void;
 }
@@ -42,9 +42,9 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
         setupMoveUpEvents(
             this,
             e,
-            e => this.props.startDrag(e, this.props.Document),
+            e => this.props.startDrag(e, this.props.Document, this._ref!, this.props.rowIndex),
             emptyFunction,
-            e => this.props.selectRow(e, this.props.Document, this.props.rowIndex)
+            e => this.props.selectRow(e, this.props.Document, this._ref!, this.props.rowIndex)
         );
     };
 
@@ -96,7 +96,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
                 ref={(row: HTMLDivElement | null) => (this._ref = row)}>
                 <div className="row-menu" style={{ width: this.props.rowMenuWidth }}>
                     <div
-                        className="row-button"
+                        className="schema-row-button"
                         onPointerDown={undoBatch(e => {
                             e.stopPropagation();
                             this.props.removeDocument?.(this.props.Document);
@@ -104,7 +104,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
                         <FontAwesomeIcon icon="times" />
                     </div>
                     <div
-                        className="row-button"
+                        className="schema-row-button"
                         onPointerDown={e => {
                             e.stopPropagation();
                             this.props.addDocTab(this.props.Document, 'add:right');
-- 
cgit v1.2.3-70-g09d2

