aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkPopup.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/linking/LinkPopup.tsx')
-rw-r--r--src/client/views/linking/LinkPopup.tsx17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/client/views/linking/LinkPopup.tsx b/src/client/views/linking/LinkPopup.tsx
index 9a9a89732..c9e3c203d 100644
--- a/src/client/views/linking/LinkPopup.tsx
+++ b/src/client/views/linking/LinkPopup.tsx
@@ -1,16 +1,16 @@
import { action, observable } from 'mobx';
import { observer } from 'mobx-react';
import { EditorView } from 'prosemirror-view';
-import { Doc } from '../../../fields/Doc';
+import * as React from 'react';
import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnTrue } from '../../../Utils';
+import { Doc } from '../../../fields/Doc';
import { Transform } from '../../util/Transform';
import { undoBatch } from '../../util/UndoManager';
-import { OpenWhere } from '../nodes/DocumentView';
+import { DefaultStyleProvider } from '../StyleProvider';
+import { OpenWhere, returnEmptyDocViewList } from '../nodes/DocumentView';
import { FormattedTextBox } from '../nodes/formattedText/FormattedTextBox';
import { SearchBox } from '../search/SearchBox';
-import { DefaultStyleProvider } from '../StyleProvider';
import './LinkPopup.scss';
-import React = require('react');
interface LinkPopupProps {
linkFrom?: () => Doc | undefined;
@@ -29,7 +29,7 @@ interface LinkPopupProps {
@observer
export class LinkPopup extends React.Component<LinkPopupProps> {
@observable private linkURL: string = '';
- @observable public view?: EditorView;
+ @observable public view?: EditorView = undefined;
// TODO: should check for valid URL
@undoBatch
@@ -61,7 +61,7 @@ export class LinkPopup extends React.Component<LinkPopupProps> {
<SearchBox
Document={Doc.MySearcher}
- DataDoc={Doc.MySearcher}
+ docViewPath={returnEmptyDocViewList}
linkFrom={linkDoc}
linkCreateAnchor={this.props.linkCreateAnchor}
linkSearch={true}
@@ -70,11 +70,10 @@ export class LinkPopup extends React.Component<LinkPopupProps> {
isSelected={returnTrue}
isContentActive={returnTrue}
select={returnTrue}
- setHeight={returnFalse}
addDocument={undefined}
addDocTab={returnTrue}
pinToPres={emptyFunction}
- rootSelected={returnTrue}
+ rootSelected={returnFalse}
styleProvider={DefaultStyleProvider}
removeDocument={undefined}
ScreenToLocalTransform={Transform.Identity}
@@ -82,9 +81,7 @@ export class LinkPopup extends React.Component<LinkPopupProps> {
PanelHeight={this.getPHeight}
renderDepth={0}
focus={emptyFunction}
- docViewPath={returnEmptyDoclist}
whenChildContentsActiveChanged={emptyFunction}
- bringToFront={emptyFunction}
childFilters={returnEmptyFilter}
childFiltersByRanges={returnEmptyFilter}
searchFilterDocs={returnEmptyDoclist}