diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-09-04 15:00:49 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-09-04 15:00:49 +0530 |
commit | 1afe593b00b8002c24086d003d0e364260b80abd (patch) | |
tree | 672c96d6ccf7d68ac668a379b1c5a6ee6d393dbe /src/client/views/PropertiesView.tsx | |
parent | de49c6f52bf97f9b10008e8ca26e767b71b49abd (diff) | |
parent | 7f6f5acc59e772cb828b8e532e16d4c40465de65 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index ddc76d373..5c83eabd1 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -45,11 +45,9 @@ 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]; - } else if (PresBox.Instance && PresBox.Instance._selectedArray.length) { - return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc); - } else { return undefined; } + if (SelectionManager.SelectedDocuments().length) return SelectionManager.SelectedDocuments()[0]; + if (PresBox.Instance && PresBox.Instance._selectedArray.length) return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc); + return undefined; } @computed get isPres(): boolean { if (this.selectedDoc?.type === DocumentType.PRES) return true; @@ -243,10 +241,10 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { return true; } else if (value[0] === "#") { const newVal = value + `:'${value}'`; - KeyValueBox.SetField(doc, value, `'${value}'`, true); + doc[DataSym][value] = value; const tags = StrCast(doc.tags, ":"); - if (!tags.includes(`#${value}:`)) { - KeyValueBox.SetField(doc, "tags", `"${tags + value + ':'}"`, true); + if (!tags.includes(`${value}:`)) { + doc[DataSym].tags = `${tags + value + ':'}`; } return true; } |