From c528298bf2375daff4ba8de170870eddf331aa4e Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Sun, 30 Jun 2024 19:08:37 -0400
Subject: removing column closes menu and stops editing

---
 .../views/collections/collectionSchema/CollectionSchemaView.tsx     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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

diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 49cb86732..1b23e3c40 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -358,6 +358,10 @@ export class CollectionSchemaView extends CollectionSubView() {
     @undoBatch
     removeColumn = (index: number) => {
         if (this.columnKeys.length === 1) return;
+        if (this._columnMenuIndex === index) {
+            this._headerRefs[index].toggleEditing(false);
+            this.closeColumnMenu();
+        }
         const currWidths = this.storedColumnWidths.slice();
         currWidths.splice(index, 1);
         const newDesiredTableWidth = currWidths.reduce((w, cw) => w + cw, 0);
@@ -425,7 +429,7 @@ export class CollectionSchemaView extends CollectionSubView() {
     @action
     dragColumn = (e: PointerEvent, index: number) => {
         this.closeColumnMenu();
-        this._headerRefs.forEach(ref => ref.stopEditing());
+        this._headerRefs.forEach(ref => ref.toggleEditing(false));
         this._draggedColIndex = index;
         this.setColDrag(true);
         const dragData = new DragManager.ColumnDragData(index);
-- 
cgit v1.2.3-70-g09d2

