diff options
author | bobzel <zzzman@gmail.com> | 2022-09-13 10:11:49 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-09-13 10:11:49 -0400 |
commit | 36b17b5b0878eeb2eb23fd4c5078e06fcc002aaf (patch) | |
tree | 33c1a3fb50381d09bf89bd43d869544a3c52c7b6 /src/client/util/SelectionManager.ts | |
parent | 7696d85b7b737a29cab189f4c65f395c5de132c7 (diff) | |
parent | bb9f0d4dec849bdaf2d358d060707b2ed1ed677d (diff) |
Merge branch 'sharing-jenny' of https://github.com/brown-dash/Dash-Web into sharing-jenny
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r-- | src/client/util/SelectionManager.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 1c84af94a..7a555d5f8 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -101,6 +101,9 @@ export namespace SelectionManager { } } ScriptingGlobals.add(function SelectionManager_selectedDocType(docType?: DocumentType, colType?: CollectionViewType, checkContext?: boolean) { + if (colType === ('tab' as any)) { + return SelectionManager.Views().lastElement()?.props.renderDepth === 0; + } let selected = (sel => (checkContext ? DocCast(sel?.context) : sel))(SelectionManager.SelectedSchemaDoc() ?? SelectionManager.Docs().lastElement()); return docType ? selected?.type === docType : colType ? selected?.viewType === colType : true; }); |