aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/SearchDocBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-03 23:45:34 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-03 23:45:34 -0400
commit50552174123eb5622821de5f848e6e70c7346214 (patch)
treebd1ac35f5f218964fba4d4b978afa3328a9d1651 /src/client/views/SearchDocBox.tsx
parentf0f9e3b47be48586acfe3030776efc98bf1d7046 (diff)
fixed a bunch of warnings
Diffstat (limited to 'src/client/views/SearchDocBox.tsx')
-rw-r--r--src/client/views/SearchDocBox.tsx15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/client/views/SearchDocBox.tsx b/src/client/views/SearchDocBox.tsx
index cd9666af8..4790a2ad7 100644
--- a/src/client/views/SearchDocBox.tsx
+++ b/src/client/views/SearchDocBox.tsx
@@ -81,8 +81,8 @@ export class SearchDocBox extends React.Component<FieldViewProps> {
updateKey = async (newKey: string) => {
this.query = newKey;
if (newKey.length > 1) {
- let newdocs = await this.getAllResults(this.query);
- let things = newdocs.docs
+ const newdocs = await this.getAllResults(this.query);
+ const things = newdocs.docs;
console.log(things);
console.log(this.content);
runInAction(() => {
@@ -152,10 +152,9 @@ export class SearchDocBox extends React.Component<FieldViewProps> {
enter = async (e: React.KeyboardEvent) => {
console.log(e.key);
if (e.key === "Enter") {
- let newdocs = await this.getAllResults(this.query)
- let things = newdocs.docs
- console.log(things);
- this.content = Docs.Create.TreeDocument(things, { _width: 200, _height: 400, _chromeStatus: "disabled", title: `Search Docs: "Results"` });
+ const newdocs = await this.getAllResults(this.query);
+ console.log(newdocs.docs);
+ this.content = Docs.Create.TreeDocument(newdocs.docs, { _width: 200, _height: 400, _chromeStatus: "disabled", title: `Search Docs: "Results"` });
}
}
@@ -290,7 +289,7 @@ export class SearchDocBox extends React.Component<FieldViewProps> {
}
}
//return Docs.Create.TreeDocument(docs, { _width: 200, _height: 400, backgroundColor: "grey", title: `Search Docs: "${this._searchString}"` });
- return Docs.Create.QueryDocument(docs, { _width: 200, _height: 400, searchText: this._searchString, title: `Query Docs: "${this._searchString}"` });
+ return Docs.Create.QueryDocument({ _width: 200, _height: 400, searchText: this._searchString, title: `Query Docs: "${this._searchString}"` });
}
@action.bound
@@ -416,7 +415,7 @@ export class SearchDocBox extends React.Component<FieldViewProps> {
top: 0,
}}
title={"Add Metadata"}
- onClick={action(() => { this.editingMetadata = !this.editingMetadata })}
+ onClick={action(() => this.editingMetadata = !this.editingMetadata)}
/>
<div className="editableclass" onKeyPress={this.enter} style={{ opacity: isEditing ? 1 : 0, pointerEvents: isEditing ? "auto" : "none", transition: "0.4s opacity ease", position: "absolute", top: 0, left: 0, height: 20, width: "-webkit-fill-available" }}>
<EditableView