From 0b798005fd4e917ecad4a961d638e1062f618d2c Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 1 Sep 2020 00:06:09 -0400 Subject: fixed shortcut buttons not showing up. fixed nex/prev search buttons not showing up. fixed search drag/delete/open buttons not showing up. --- src/client/views/MainView.tsx | 76 ++++++++++------------ .../views/collections/CollectionSchemaCells.tsx | 2 +- .../views/collections/CollectionSchemaView.scss | 1 + src/client/views/search/SearchBox.tsx | 2 +- 4 files changed, 39 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index d479f0f78..4eccbaeb1 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -297,41 +297,40 @@ export class MainView extends React.Component { } @computed get flyout() { - return !this._sidebarContent || !this._flyoutWidth ? (null) : -
-
- "lightgrey"} - /> -
- {this.docButtons} -
; + return
+
+ "lightgrey"} + /> +
+ {this.docButtons} +
; } @computed get menuPanel() { @@ -371,19 +370,16 @@ export class MainView extends React.Component { @action selectMenu = (button: Doc) => { const title = StrCast(Doc.GetProto(button).title); - if (this._panelContent === title && this._flyoutWidth) { - this.closeFlyout(); - } else { + this.closeFlyout(); + if (this._panelContent !== title || !this._flyoutWidth) { switch (this._panelContent = title) { case "Settings": SettingsManager.Instance.open(); - this.closeFlyout(); break; case "Catalog": SearchBox.Instance._searchFullDB = "My Stuff"; SearchBox.Instance.newsearchstring = ""; SearchBox.Instance.enter(undefined); - this.closeFlyout(); break; default: this._sidebarContent.proto = button.target as any; diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 0d3a951cf..18ae260e8 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -514,7 +514,7 @@ export class CollectionSchemaCheckboxCell extends CollectionSchemaCell { @observer export class CollectionSchemaButtons extends CollectionSchemaCell { render() { - return !this._rowDoc._searchDoc || ![DocumentType.PDF, DocumentType.RTF].includes(StrCast(this._rowDoc.type) as DocumentType) ? <> : + return !this.props.Document._searchDoc || ![DocumentType.PDF, DocumentType.RTF].includes(StrCast(this._rowDoc.type) as DocumentType) ? <> :