aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-28 19:36:44 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-28 19:36:44 -0400
commit0080670351d472a5cdf01841a47ea98e0027fb53 (patch)
tree5aa0ec9887765bba047fd7d28f4783de7f6673a4 /src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
parentdb7e5ed3ac36f05787b809e2ae03c94f310ef3e4 (diff)
dragging col stops editing of schema header
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index a3bc537d2..e4ffc5b13 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -67,6 +67,7 @@ export class CollectionSchemaView extends CollectionSubView() {
private _documentOptions: DocumentOptions = new DocumentOptions();
private _tableContentRef: HTMLDivElement | null = null;
private _menuTarget = React.createRef<HTMLDivElement>();
+ private _headerRefs: SchemaColumnHeader[] = [];
constructor(props: any) {
super(props);
@@ -411,6 +412,7 @@ export class CollectionSchemaView extends CollectionSubView() {
@action
dragColumn = (e: PointerEvent, index: number) => {
this.closeColumnMenu();
+ this._headerRefs.forEach(ref => ref.stopEditing());
this._draggedColIndex = index;
this.setColDrag(true);
const dragData = new DragManager.ColumnDragData(index);
@@ -1331,6 +1333,7 @@ export class CollectionSchemaView extends CollectionSubView() {
<SchemaColumnHeader
// eslint-disable-next-line react/no-array-index-key
//cleanupField={this.cleanupComputedField}
+ ref={r => r && this._headerRefs.push(r)}
keysDropdown={(this.keysDropdown)}
schemaView={this}
columnWidth={() => CollectionSchemaView._minColWidth} //TODO: update