From ee2f9feea2ec70dbf5a60d2b26a61b05eca3dbf5 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 23 Feb 2021 10:23:26 -0500
Subject: cleaned up EditableView a bit

---
 .../views/collections/CollectionTimeView.tsx       | 32 +++++++++++-----------
 1 file changed, 16 insertions(+), 16 deletions(-)

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

diff --git a/src/client/views/collections/CollectionTimeView.tsx b/src/client/views/collections/CollectionTimeView.tsx
index cd91cbf63..857d5e1d7 100644
--- a/src/client/views/collections/CollectionTimeView.tsx
+++ b/src/client/views/collections/CollectionTimeView.tsx
@@ -8,7 +8,7 @@ import { RichTextField } from "../../../fields/RichTextField";
 import { listSpec } from "../../../fields/Schema";
 import { ComputedField, ScriptField } from "../../../fields/ScriptField";
 import { Cast, NumCast, StrCast } from "../../../fields/Types";
-import { emptyFunction, returnFalse, returnTrue, setupMoveUpEvents } from "../../../Utils";
+import { emptyFunction, returnFalse, returnTrue, setupMoveUpEvents, returnEmptyString } from "../../../Utils";
 import { Docs, DocUtils } from "../../documents/Documents";
 import { DocumentManager } from "../../util/DocumentManager";
 import { Scripting } from "../../util/Scripting";
@@ -193,22 +193,22 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
     }
 
     @computed get pivotKeyUI() {
-        const newEditableViewProps = {
-            GetValue: () => "",
-            SetValue: (value: any) => {
-                if (value?.length) {
-                    this.layoutDoc._pivotField = value;
-                    return true;
-                }
-                return false;
-            },
-            showMenuOnLoad: true,
-            contents: ":" + StrCast(this.layoutDoc._pivotField),
-            toggle: this.toggleVisibility,
-            color: "#f1efeb" // this.props.headingObject ? this.props.headingObject.color : "#f1efeb";
-        };
         return <div className={"pivotKeyEntry"}>
-            <EditableView {...newEditableViewProps} display={"inline"} menuCallback={this.menuCallback} />
+            <EditableView
+                GetValue={returnEmptyString}
+                SetValue={(value: any) => {
+                    if (value?.length) {
+                        this.layoutDoc._pivotField = value;
+                        return true;
+                    }
+                    return false;
+                }}
+                toggle={this.toggleVisibility}
+                background={"#f1efeb"} // this.props.headingObject ? this.props.headingObject.color : "#f1efeb";
+                contents={":" + StrCast(this.layoutDoc._pivotField)}
+                showMenuOnLoad={true}
+                display={"inline"}
+                menuCallback={this.menuCallback} />
         </div>;
     }
 
-- 
cgit v1.2.3-70-g09d2

