aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoranika <anika.ahluwalia@gmail.com>2021-01-07 10:33:04 -0600
committeranika <anika.ahluwalia@gmail.com>2021-01-07 10:33:04 -0600
commitb98c90c3c59eb5f65a4c7aad7ff8247558a5564c (patch)
treef87f6f8822a38772f28ebbaef843adb524c066bb /src
parenta70a224d40ed511e8278ce01a74fb0a8a012b075 (diff)
last before pull
Diffstat (limited to 'src')
-rw-r--r--src/client/views/StyleProvider.tsx2
-rw-r--r--src/client/views/collections/TreeView.tsx3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx
index c9eedb85d..607783d51 100644
--- a/src/client/views/StyleProvider.tsx
+++ b/src/client/views/StyleProvider.tsx
@@ -73,7 +73,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps |
const opacity = () => props?.styleProvider?.(doc, props, StyleProp.Opacity);
switch (property.split(":")[0]) {
- case StyleProp.TreeViewIcon: return doc && Doc.toIcon(doc);
+ case StyleProp.TreeViewIcon: return doc ? Doc.toIcon(doc) : "question";
case StyleProp.DocContents: return undefined;
case StyleProp.WidgetColor: return darkScheme() ? "lightgrey" : "dimgrey";
case StyleProp.Opacity: return Cast(doc?._opacity, "number", Cast(doc?.opacity, "number", null));
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index a297ad708..6a0e05215 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -441,14 +441,17 @@ export class TreeView extends React.Component<TreeViewProps> {
@computed get renderBullet() {
TraceMobx();
+
const iconType = Doc.toIcon(this.doc);
+ // console.log(this.titleStyleProvider?.(this.doc, this.props.treeView.props, StyleProp.TreeViewIcon)); <- always undefined
//const iconType = this.titleStyleProvider?.(this.doc, this.props.treeView.props, StyleProp.TreeViewIcon);
// const footerDecoration = this.titleStyleProvider?.(this.doc, this.props.treeView.props, StyleProp.Decoration + ":footer");
const checked = this.onCheckedClick ? (this.doc.treeViewChecked ?? "unchecked") : undefined;
+
return <div className={`bullet${this.outlineMode ? "-outline" : ""}`} key={"bullet"}
title={this.childDocs?.length ? `click to see ${this.childDocs?.length} items` : "view fields"}
onClick={this.bulletClick}