aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-09-02 15:04:44 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-09-02 15:04:44 -0500
commitcb28e0cc898b0f7f880a23501bc1510df3c1c3fc (patch)
tree885caa3652e04a1dc9825c49822cb7a0c73c82fe /src/client/views/MainView.tsx
parent831e634e9a541eca34da163d879c80b97292204d (diff)
parenta7975e6f18b0d837403ced65ee5979b60b43f5bc (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_bug_fixes
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 7c7c5b72b..e6e80d9fb 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -372,9 +372,9 @@ export class MainView extends React.Component {
@action
selectMenu = (button: Doc) => {
const title = StrCast(Doc.GetProto(button).title);
- const closed = !this._flyoutWidth;
+ const willOpen = !this._flyoutWidth || this._panelContent !== title;
this.closeFlyout();
- if (this._panelContent !== title || !this._flyoutWidth) {
+ if (willOpen) {
switch (this._panelContent = title) {
case "Settings":
SettingsManager.Instance.open();
@@ -384,7 +384,7 @@ export class MainView extends React.Component {
SearchBox.Instance.enter(undefined);
break;
default:
- closed && this.expandFlyout(button);
+ this.expandFlyout(button);
}
}
return true;
@@ -434,6 +434,7 @@ export class MainView extends React.Component {
this._lastButton && (this._lastButton.color = "white");
this._lastButton && (this._lastButton._backgroundColor = "");
this._panelContent = "none";
+ this._sidebarContent.proto = undefined;
this._flyoutWidth = 0;
});
@@ -520,7 +521,7 @@ export class MainView extends React.Component {
</defs>
</svg>;
}
- select = (ctrlPressed: boolean) => { SelectionManager.SelectDoc(this, ctrlPressed); };
+ select = (ctrlPressed: boolean) => { };
@computed get search() {
TraceMobx();