aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-06-14 12:40:42 -0400
committerbobzel <zzzman@gmail.com>2023-06-14 12:40:42 -0400
commit38edde57bc7bcf45ad314e66d98152282b9fd57c (patch)
treef0e694a70a931655297d9136cecd6ad9e716bd82 /src/fields/Doc.ts
parentd7e2cf07bbfd7f9ed35c42068326d4ea988306bc (diff)
fixed icons on tree views and presentation
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 92ae64567..c674a20d2 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -1534,13 +1534,13 @@ export namespace Doc {
// prettier-ignore
export function toIcon(doc?: Doc, isOpen?: boolean) {
- switch (StrCast(doc?.type)) {
+ switch (isOpen !== undefined ? DocumentType.COL: StrCast(doc?.type)) {
case DocumentType.IMG: return 'image';
case DocumentType.COMPARISON: return 'columns';
case DocumentType.RTF: return 'sticky-note';
case DocumentType.COL:
- const folder: IconProp = isOpen ? 'folder-open' : 'folder';
- const chevron: IconProp = isOpen ? 'chevron-down' : 'chevron-right';
+ const folder: IconProp = isOpen === true ? 'folder-open' : isOpen === false ? 'folder' : 'question';
+ const chevron: IconProp = isOpen === true ? 'chevron-down' : isOpen === false ? 'chevron-right' : 'question';
return !doc?.isFolder ? folder : chevron;
case DocumentType.WEB: return 'globe-asia';
case DocumentType.SCREENSHOT: return 'photo-video';