diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-12-06 23:11:51 -0500 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-12-06 23:11:51 -0500 |
commit | 600d06a162b4489fd52d5809eb9f5a69f28618fc (patch) | |
tree | ea7af2823fad65877d32afb388611da57886d938 /src/client/views/MainView.tsx | |
parent | 71ebece4a97547ac9bec32cd30957d38c96fb755 (diff) |
performance tuning for sidebar
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 175af1abc..dacc9226e 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -15,7 +15,7 @@ import { List } from '../../new_fields/List'; import { listSpec } from '../../new_fields/Schema'; import { Cast, FieldValue, StrCast } from '../../new_fields/Types'; import { CurrentUserUtils } from '../../server/authentication/models/current_user_utils'; -import { emptyFunction, returnEmptyString, returnFalse, returnOne, returnTrue, Utils } from '../../Utils'; +import { emptyFunction, returnEmptyString, returnFalse, returnOne, returnTrue, Utils, emptyPath } from '../../Utils'; import GoogleAuthenticationManager from '../apis/GoogleAuthenticationManager'; import { DocServer } from '../DocServer'; import { Docs, DocumentOptions } from '../documents/Documents'; @@ -261,11 +261,10 @@ export class MainView extends React.Component { getPHeight = () => this._panelHeight; getContentsHeight = () => this._panelHeight - this._buttonBarHeight; - _emptyPath = []; @computed get mainDocView() { return <DocumentView Document={this.mainContainer!} DataDoc={undefined} - LibraryPath={this._emptyPath} + LibraryPath={emptyPath} addDocument={undefined} addDocTab={this.addDocTabFunc} pinToPres={emptyFunction} @@ -367,7 +366,7 @@ export class MainView extends React.Component { <DocumentView Document={sidebarButtonsDoc} DataDoc={undefined} - LibraryPath={[]} + LibraryPath={emptyPath} addDocument={undefined} addDocTab={this.addDocTabFunc} pinToPres={emptyFunction} @@ -394,7 +393,7 @@ export class MainView extends React.Component { <DocumentView Document={sidebarContent} DataDoc={undefined} - LibraryPath={[]} + LibraryPath={emptyPath} addDocument={undefined} addDocTab={this.addDocTabFunc} pinToPres={emptyFunction} @@ -478,7 +477,7 @@ export class MainView extends React.Component { <CollectionLinearView Document={CurrentUserUtils.UserDocument.expandingButtons} DataDoc={undefined} - LibraryPath={[]} + LibraryPath={emptyPath} fieldKey={"data"} annotationsKey={""} select={emptyFunction} |