diff options
| author | bobzel <zzzman@gmail.com> | 2020-09-11 19:51:08 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-09-11 19:51:08 -0400 |
| commit | bfd2769ccce8db190913d9a9fcb6f8f3cac75935 (patch) | |
| tree | 267a7a4480e9595ca43c51060e9ec58d4e48e2a7 /src/client/views/collections | |
| parent | b81ad33b746387dc785580b719866f479fbd9b30 (diff) | |
fixed warnings and fixed focus on slide
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index f92fbc9e3..ba424be37 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -253,7 +253,7 @@ class TreeView extends React.Component<TreeViewProps> { const added = Doc.AddDocToList(this.dataDoc, this.fieldKey, doc); added && (doc.context = this.doc.context); return added; - } + }; addDoc = (doc: Doc | Doc[]) => (doc instanceof Doc ? [doc] : doc).reduce( (flg: boolean, doc) => flg && localAdd(doc), true) || parentAddDoc(doc); } @@ -308,7 +308,7 @@ class TreeView extends React.Component<TreeViewProps> { const added = Doc.AddDocToList(this.dataDoc, key, doc, addBefore, before, false, true); added && (doc.context = this.doc.context); return added; - } + }; const addDoc = (doc: Doc | Doc[], addBefore?: Doc, before?: boolean) => (doc instanceof Doc ? [doc] : doc).reduce((flg, doc) => flg && localAdd(doc, addBefore, before), true); contentElement = TreeView.GetChildElements(contents instanceof Doc ? [contents] : DocListCast(contents), this.props.treeView, doc, undefined, key, this.props.containingCollection, this.props.prevSibling, addDoc, remDoc, this.move, @@ -357,7 +357,7 @@ class TreeView extends React.Component<TreeViewProps> { const added = Doc.AddDocToList(this.dataDoc, expandKey, doc, addBefore, before, false, true); added && (doc.context = this.doc.context); return added; - } + }; const addDoc = (doc: Doc | Doc[], addBefore?: Doc, before?: boolean) => (doc instanceof Doc ? [doc] : doc).reduce((flg, doc) => flg && localAdd(doc, addBefore, before), true); const docs = expandKey === "links" ? this.childLinks : expandKey === "annotations" ? this.childAnnos : this.childDocs; const sortKey = `${this.fieldKey}-sortAscending`; @@ -901,7 +901,7 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll bullet.context = this.doc; this.addDoc(bullet, childDocs.length ? childDocs[0] : undefined, true); setTimeout(() => RichTextMenu.Instance.TextView?.EditorView?.focus(), 150); - }) + }); editableTitle(childDocs: Doc[]) { return <EditableView @@ -913,7 +913,7 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll GetValue={() => StrCast(this.dataDoc.title)} SetValue={undoBatch((value: string, shift: boolean, enter: boolean) => { if (this.props.Document.treeViewOutlineMode && enter) { - this.makeTextCollection(childDocs) + this.makeTextCollection(childDocs); } return Doc.SetInPlace(this.dataDoc, "title", value, false); })} />; @@ -927,7 +927,7 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll return <div style={{ display: "inline-block", height: this.rtfOutlineHeight() }} key={this.doc[Id]} onKeyDown={e => { e.stopPropagation(); - e.key === "Enter" && this.makeTextCollection(childDocs) + e.key === "Enter" && this.makeTextCollection(childDocs); }}> <ContentFittingDocumentView Document={this.doc} @@ -957,11 +957,11 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll bringToFront={returnFalse} ContentScaling={returnOne} /> - </div> + </div>; } - onChildClick = () => { return this.props.onChildClick?.() || ScriptCast(this.doc.onChildClick); } - whenActiveChanged = (isActive: boolean) => { this.props.whenActiveChanged(this._isChildActive = isActive); } + onChildClick = () => this.props.onChildClick?.() || ScriptCast(this.doc.onChildClick); + whenActiveChanged = (isActive: boolean) => { this.props.whenActiveChanged(this._isChildActive = isActive); }; active = (outsideReaction: boolean | undefined) => this.props.active(outsideReaction) || this._isChildActive; render() { TraceMobx(); |
