diff options
| author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2021-08-02 16:11:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-02 16:11:08 -0400 |
| commit | 4241043265da64f4d4ecd622ad893638bd0d9435 (patch) | |
| tree | 2d399160a319b7931b22f7b7fd38e9ad3483ea33 /src/client/views/collections/TreeView.tsx | |
| parent | 44ed361a9f59a16bbd1b5f2483ba7eb10df2fa82 (diff) | |
| parent | 94705e6cf119b9cdfcc0d857f71051eac10235c9 (diff) | |
Merge pull request #11 from brown-dash/sharing_scenario
Sharing scenario
Diffstat (limited to 'src/client/views/collections/TreeView.tsx')
| -rw-r--r-- | src/client/views/collections/TreeView.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx index 401bdcb02..e33c39d20 100644 --- a/src/client/views/collections/TreeView.tsx +++ b/src/client/views/collections/TreeView.tsx @@ -151,7 +151,10 @@ export class TreeView extends React.Component<TreeViewProps> { this.treeViewOpen = !this.treeViewOpen; } else { // choose an appropriate alias or make one. --- choose the first alias that (1) user owns, (2) has no context field ... otherwise make a new alias + // this.props.addDocTab(CurrentUserUtils.ActiveDashboard.isShared ? Doc.MakeAlias(this.props.document) : this.props.document, "add:right"); + // choose an appropriate alias or make one -- -- choose the first alias that (1) the user owns, (2) has no context field - if I own it and someone else does not have it open,, otherwise create an alias this.props.addDocTab(this.props.document, "add:right"); + } } constructor(props: any) { @@ -511,6 +514,7 @@ export class TreeView extends React.Component<TreeViewProps> { [{ script: ScriptField.MakeFunction(`DocFocusOrOpen(self)`)!, label: "Focus or Open" }]; } onChildClick = () => this.props.onChildClick?.() ?? (this._editTitleScript?.() || ScriptCast(this.doc.treeChildClick)); + onChildDoubleClick = () => (!this.props.treeView.outlineMode && this._openScript?.()) || ScriptCast(this.doc.treeChildDoubleClick); refocus = () => this.props.treeView.props.focus(this.props.treeView.props.Document); |
