aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesButtons.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r--src/client/views/PropertiesButtons.tsx10
1 files changed, 8 insertions, 2 deletions
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) {