From 3c44131f75fe0c311363b36e824604c91f1babc8 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 1 Oct 2020 11:15:41 -0400
Subject: fixed closed library flyout view to not render a DocumentView.  fixed
 sidebar panels to not be selectable.  fixed changing view of sidebar panel to
 only affect that panel

---
 src/client/views/collections/CollectionMenu.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/client/views/collections/CollectionMenu.tsx')

diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx
index 51d1d5559..e9cb57fed 100644
--- a/src/client/views/collections/CollectionMenu.tsx
+++ b/src/client/views/collections/CollectionMenu.tsx
@@ -234,8 +234,9 @@ export class CollectionViewBaseChrome extends React.Component<CollectionMenuProp
 
     @undoBatch
     viewChanged = (e: React.ChangeEvent) => {
+        const target = this.document !== Doc.UserDoc().sidebar ? this.document : this.document.proto as Doc;
         //@ts-ignore
-        this.document._viewType = e.target.selectedOptions[0].value;
+        target._viewType = e.target.selectedOptions[0].value;
     }
 
     commandChanged = (e: React.ChangeEvent) => {
-- 
cgit v1.2.3-70-g09d2

