aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-25 11:03:39 -0400
committerbobzel <zzzman@gmail.com>2020-10-25 11:03:39 -0400
commit10935eb271443bd390d6b27b616bfcfef4ad01b2 (patch)
treef09abc5d632cc525375b4db15ee7bfc50692965a /src/client/views/PropertiesView.tsx
parent7096b3a4c888816db9196f56a7bc01b89558d0ce (diff)
fixed updating pres.box instance and selectedArray to trigger mobx updates properluy
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index e93173c9e..36c4648cf 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -46,7 +46,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get selectedDoc() { return SelectionManager.SelectedSchemaDoc() || this.selectedDocumentView?.rootDoc; }
@computed get selectedDocumentView() {
if (SelectionManager.SelectedDocuments().length) return SelectionManager.SelectedDocuments()[0];
- if (PresBox.Instance && PresBox.Instance._selectedArray) return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc);
+ if (PresBox.Instance?._selectedArray) return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc);
return undefined;
}
@computed get isPres(): boolean {
@@ -982,7 +982,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>;
}
if (this.isPres) {
- const selectedItem: boolean = PresBox.Instance?._selectedArray.length > 0;
+ const selectedItem: boolean = PresBox.Instance?._selectedArray.size > 0;
const type = PresBox.Instance.activeItem?.type;
return <div className="propertiesView" style={{ width: this.props.width }}>
<div className="propertiesView-title" style={{ width: this.props.width }}>
@@ -991,7 +991,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div className="propertiesView-name">
{this.editableTitle}
<div className="propertiesView-presSelected">
- {PresBox.Instance?._selectedArray.length} selected
+ {PresBox.Instance?._selectedArray.size} selected
<div className="propertiesView-selectedList">
{PresBox.Instance?.listOfSelected}
</div>