aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/MainView.tsx6
-rw-r--r--src/client/views/PropertiesButtons.tsx10
-rw-r--r--src/client/views/collections/collectionFreeForm/PropertiesView.tsx10
3 files changed, 14 insertions, 12 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 8113ad698..d3bdeda9e 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -95,10 +95,6 @@ export class MainView extends React.Component {
@observable public sidebarContent: any = this.userDoc?.["tabs-panelContainer"];
@observable public panelContent: string = "none";
@observable public showProperties: boolean = false;
-
- @computed get selectedDocumentView() { return SelectionManager.LastSelection(); }
- @observable selectedDoc: Doc | undefined = this.selectedDocumentView?.props.Document;
- @observable selectedDataDoc: Doc | undefined = this.selectedDocumentView?.props.DataDoc ? this.selectedDocumentView.props.DataDoc : this.selectedDoc;
public isPointerDown = false;
@observable _propertiesWidth: number = 0;
@@ -359,7 +355,7 @@ export class MainView extends React.Component {
docFilters={returnEmptyFilter}
ContainingCollectionView={undefined}
ContainingCollectionDoc={undefined}
- renderDepth={1}
+ renderDepth={0}
/>;
}
@computed get dockingContent() {
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index 1b06a41fa..b55593b11 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -68,8 +68,14 @@ export class PropertiesButtons extends React.Component<{}, {}> {
public static hasPushedHack = false;
public static hasPulledHack = false;
- @observable selectedDocumentView: DocumentView | undefined = SelectionManager.LastSelection();
- @observable selectedDoc: Doc | undefined = this.selectedDocumentView?.props.Document;
+
+ @computed get selectedDocumentView() {
+ if (SelectionManager.SelectedDocuments().length) {
+ return SelectionManager.SelectedDocuments()[0];
+ } else { return undefined; }
+ }
+ @computed get selectedDoc() { return this.selectedDocumentView?.props.Document; }
+ @computed get dataDoc() { return this.selectedDocumentView?.props.DataDoc; }
public startPullOutcome = action((success: boolean) => {
if (!this._pullAnimating) {
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
index 11609b1c0..1954a11bf 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
@@ -30,12 +30,12 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get MAX_EMBED_HEIGHT() { return 200; }
@computed get selectedDocumentView() {
- if (SelectionManger.SelectedDocuments().length) {
+ if (SelectionManager.SelectedDocuments().length) {
return SelectionManager.SelectedDocuments()[0];
} else { return undefined; }
}
- @computed get selectedDoc() { return this.selectedDocumentView?.props.Document; }
- @computed get dataDoc() { return this.selectedDocumentView?.props.DataDoc; }
+ @computed get selectedDoc() { return this.selectedDocumentView?.rootDoc; }
+ @computed get dataDoc() { return this.selectedDocumentView?.dataDoc; }
@action
rtfWidth = () => {
@@ -156,7 +156,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
render() {
- if (!this.selectedDocumentView || !this.selectedDoc || !this.dataDoc) {
+ if (!this.selectedDoc) {
return <div className="propertiesView" >
<div className="propertiesView-title">
No Document Selected
@@ -168,7 +168,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
Properties
</div>
<div className="propertiesView-name">
- {this.dataDoc.title}
+ {this.selectedDoc.title}
</div>
<div className="propertiesView-settings">
<div className="propertiesView-settings-title"> Settings</div>