aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2023-03-01 21:17:28 -0500
committermehekj <mehek.jethani@gmail.com>2023-03-01 21:17:28 -0500
commitfdf2f866e948d030e7b29009ed5c06e384d74fe1 (patch)
treecfc71147a60965700e04412a1d1ecd676f37d6a0 /src/client/views/collections/collectionSchema/SchemaRowBox.tsx
parent9853c1e3ca1c3a1d2da210118b927adc559e67fa (diff)
drag and drop working
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 5de9fdf5c..4b709f670 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -40,15 +40,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<FieldViewProps>() {
@action
onRowPointerDown = (e: React.PointerEvent) => {
- e.stopPropagation();
-
- // setupMoveUpEvents(
- // this,
- // e,
- // e => this.schemaView?.startDrag(e, this.rootDoc, this.rowIndex) ?? true,
- // emptyFunction,
- // e => this.schemaView?.selectRow(e, this.rootDoc, this.rowIndex)
- // );
+ setupMoveUpEvents(this, e, e => this.schemaView?.startDrag(e, this.rootDoc, this.rowIndex) ?? true, emptyFunction, emptyFunction, false);
};
onPointerEnter = (e: any) => {
@@ -97,9 +89,9 @@ export class SchemaRowBox extends ViewBoxBaseComponent<FieldViewProps>() {
? { height: CollectionSchemaView._rowHeight, backgroundColor: Colors.LIGHT_BLUE, pointerEvents: this.schemaView?.props.isContentActive() ? 'all' : undefined /*, opacity: this.props.dragging ? 0.5 : 1 */ }
: { height: CollectionSchemaView._rowHeight, pointerEvents: this.schemaView?.props.isContentActive() ? 'all' : undefined }
}
- // onPointerDown={this.onRowPointerDown}
- // onPointerEnter={this.onPointerEnter}
- // onPointerLeave={this.onPointerLeave}
+ onPointerDown={this.onRowPointerDown}
+ onPointerEnter={this.onPointerEnter}
+ onPointerLeave={this.onPointerLeave}
ref={(row: HTMLDivElement | null) => {
row && this.schemaView?.addRowRef(this.rootDoc, row);
this._ref = row;