From 81ee0bf99da264b76f26a21d57259d478cac07f3 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 10 Dec 2020 11:58:25 -0500
Subject: fixed filterBox/TreeView to support checkboxes again.  Simplified
 {DocumentView/CollectionView/FieldView}props

---
 src/client/views/PreviewCursor.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/client/views/PreviewCursor.tsx')

diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx
index d756227f6..ac61dd1d8 100644
--- a/src/client/views/PreviewCursor.tsx
+++ b/src/client/views/PreviewCursor.tsx
@@ -11,6 +11,7 @@ import { Transform } from "../util/Transform";
 import { undoBatch, UndoManager } from '../util/UndoManager';
 import { FormattedTextBox } from './nodes/formattedText/FormattedTextBox';
 import "./PreviewCursor.scss";
+import { returnFalse } from '../../Utils';
 
 @observer
 export class PreviewCursor extends React.Component<{}> {
@@ -145,13 +146,13 @@ export class PreviewCursor extends React.Component<{}> {
         onKeyPress: (e: KeyboardEvent) => void,
         addLiveText: (doc: Doc) => void,
         getTransform: () => Transform,
-        addDocument: (doc: Doc | Doc[]) => boolean,
+        addDocument: undefined | ((doc: Doc | Doc[]) => boolean),
         nudge: undefined | ((nudgeX: number, nudgeY: number) => boolean)) {
         this._clickPoint = [x, y];
         this._onKeyPress = onKeyPress;
         this._addLiveTextDoc = addLiveText;
         this._getTransform = getTransform;
-        this._addDocument = addDocument;
+        this._addDocument = addDocument || returnFalse;
         this._nudge = nudge;
         this.Visible = true;
     }
-- 
cgit v1.2.3-70-g09d2

