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

---
 .../collections/collectionSchema/SchemaColumnHeader.tsx    | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

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

diff --git a/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx b/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx
index 70db3d1f5..2b56ae881 100644
--- a/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx
@@ -71,15 +71,9 @@ export class SchemaColumnHeader extends ObservableReactComponent<SchemaColumnHea
     getFinfo = computedFn((fieldKey: string) => this._props.schemaView?.fieldInfos.get(fieldKey));
     setColumnValues = (field: string, defaultValue: string) => {this._props.schemaView?.setKey(field, defaultValue, this._props.columnIndex);}
     @action updateAlt = (newAlt: string) => {this._altTitle = newAlt;}
-    @action updateKeyDropdown = (value: string) => {this._props.schemaView.updateKeySearch(value)}
-    @action stopEditing = () => {
-        this._inputRef?.setIsEditing(false);
-        this._inputRef?.setIsFocused(false);
-    }
-
-    openKeyDropdown = () => {
-        this._props.schemaView.openColumnMenu(this._props.columnIndex, false)
-    }
+    updateKeyDropdown = (value: string) => {this._props.schemaView.updateKeySearch(value)}
+    toggleEditing = (editing: boolean) => {this._inputRef?.setIsEditing(editing); this._inputRef?.setIsFocused(editing);}
+    openKeyDropdown = () => {this._props.schemaView.openColumnMenu(this._props.columnIndex, false)}
 
     @action
     setupDrag = (e: React.PointerEvent) => {
@@ -89,7 +83,7 @@ export class SchemaColumnHeader extends ObservableReactComponent<SchemaColumnHea
     renderProps = (props: SchemaColumnHeaderProps) => {
         const { columnKeys, columnWidth, Document } = props;
         const fieldKey = columnKeys[props.columnIndex];
-        const color = 'black'; // color of text in cells
+        const color = 'black';
         const fieldProps: FieldViewProps = {
             childFilters: returnEmptyFilter,
             childFiltersByRanges: returnEmptyFilter,
-- 
cgit v1.2.3-70-g09d2

