From bdeeb202d264b2710f21b816f4e05a29793aa78e Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 23 Mar 2023 21:17:43 -0400
Subject: fixed dragging schema rows.  fixed not being able to click row
 buttons unless schema view is active.

---
 .../collections/collectionSchema/CollectionSchemaView.tsx    | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(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 5f795c5ac..151e6cbef 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -884,6 +884,8 @@ export class CollectionSchemaView extends CollectionSubView() {
     rowHeightFunc = () => CollectionSchemaView._rowHeight;
     rowClickScriptFunc = () => this.rowOnClickScript;
     isContentActive = () => this.props.isSelected() || this.props.isContentActive();
+    screenToLocal = () => this.props.ScreenToLocalTransform().translate(-this.tableWidth, 0);
+    previewWidthFunc = () => this.previewWidth;
     render() {
         return (
             <div
@@ -893,11 +895,7 @@ export class CollectionSchemaView extends CollectionSubView() {
                     this.createDashEventsTarget(ele);
                 }}
                 onDrop={this.onExternalDrop.bind(this)}>
-                <div
-                    className="schema-table"
-                    style={{
-                        pointerEvents: this.isContentActive() ? 'all' : 'none',
-                    }}>
+                <div className="schema-table">
                     <div className="schema-header-row" style={{ height: CollectionSchemaView._rowHeight }}>
                         <div className="row-menu" style={{ width: CollectionSchemaView._rowMenuWidth }}>
                             <div
@@ -982,11 +980,11 @@ export class CollectionSchemaView extends CollectionSubView() {
                                 focus={DocUtils.DefaultFocus}
                                 renderDepth={this.props.renderDepth}
                                 rootSelected={this.rootSelected}
-                                PanelWidth={() => this.previewWidth}
+                                PanelWidth={this.previewWidthFunc}
                                 PanelHeight={this.props.PanelHeight}
                                 isContentActive={returnTrue}
                                 isDocumentActive={returnFalse}
-                                ScreenToLocalTransform={() => this.props.ScreenToLocalTransform().translate(-this.tableWidth, 0)}
+                                ScreenToLocalTransform={this.screenToLocal}
                                 docFilters={this.childDocFilters}
                                 docRangeFilters={this.childDocRangeFilters}
                                 searchFilterDocs={this.searchFilterDocs}
-- 
cgit v1.2.3-70-g09d2

