diff options
author | bobzel <zzzman@gmail.com> | 2020-12-10 11:58:25 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-12-10 11:58:25 -0500 |
commit | 81ee0bf99da264b76f26a21d57259d478cac07f3 (patch) | |
tree | 200a0e18ecfd3812d62aea722782b9d007f99964 /src/client/views/PreviewCursor.tsx | |
parent | 3412313dcde569f1f23616fa5e8a92c3985e0449 (diff) |
fixed filterBox/TreeView to support checkboxes again. Simplified {DocumentView/CollectionView/FieldView}props
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
-rw-r--r-- | src/client/views/PreviewCursor.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |