aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorAndy Rickert <andrew_rickert@brown.edu>2020-08-05 01:17:28 -0400
committerAndy Rickert <andrew_rickert@brown.edu>2020-08-05 01:17:28 -0400
commit85fee2871fcbfba90ca9ce3ba4a1842e85e41f9f (patch)
tree6f8e7623929910e2dae1960a6415624ef47b8242 /src/client/views/MainView.tsx
parent8c7196ca1eda1f89bbac3e2f24219df739978776 (diff)
lint
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 119fa3451..1b2dd1c44 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -82,8 +82,8 @@ export class MainView extends React.Component {
@computed public get mainFreeform(): Opt<Doc> { return (docs => (docs && docs.length > 1) ? docs[1] : undefined)(DocListCast(this.mainContainer!.data)); }
@computed public get searchDoc() { return Cast(this.userDoc["search-panel"], Doc) as Doc; }
-
- @observable public sidebarContent: any = this.userDoc?.["sidebar"];
+ sidebar: string = "sidebar";
+ @observable public sidebarContent: any = this.userDoc?.[this.sidebar];
@observable public panelContent: string = "none";
@observable public showProperties: boolean = false;
public isPointerDown = false;
@@ -193,8 +193,9 @@ export class MainView extends React.Component {
}
if (targets && targets.length && SearchBox.Instance._searchbarOpen) {
let check = false;
+ const icon = "icon";
targets.forEach((thing) => {
- if (thing.className.toString() === "collectionSchemaView-table" || (thing as any)?.dataset["icon"] === "filter" || thing.className.toString() === "beta" || thing.className.toString() === "collectionSchemaView-menuOptions-wrapper") {
+ if (thing.className.toString() === "collectionSchemaView-table" || (thing as any)?.dataset[icon] === "filter" || thing.className.toString() === "beta" || thing.className.toString() === "collectionSchemaView-menuOptions-wrapper") {
check = true;
}
});
@@ -731,7 +732,7 @@ export class MainView extends React.Component {
@computed get search() {
return <div className="mainView-searchPanel">
{/* <div style={{ float: "left", marginLeft: "10px" }}>{Doc.CurrentUserEmail}</div> */}
- <div><DocumentView Document={this.searchDoc!}
+ <div><DocumentView Document={this.searchDoc}
DataDoc={undefined}
LibraryPath={emptyPath}
addDocument={undefined}