aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/TreeView.tsx
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-07-19 18:49:02 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-07-19 18:49:02 -0400
commit77b26f2dbdc2f3df0ab65aa3053854b4a24c586f (patch)
tree935a3a64575698d9c98cbb66fcd2f1f5854529a4 /src/client/views/collections/TreeView.tsx
parentfb7a5724eec129b8a05d14e8dd58baaa5e15eb30 (diff)
parentd7a3e39e901054d0308df158cfa578a94f80c467 (diff)
Merge branch 'master' into sophie-report-manager
Diffstat (limited to 'src/client/views/collections/TreeView.tsx')
-rw-r--r--src/client/views/collections/TreeView.tsx28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index fa9f895fd..9158508fc 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -712,23 +712,23 @@ export class TreeView extends React.Component<TreeViewProps> {
!(this.doc.text as RichTextField)?.Text ? null : (
<IconButton
color={color}
- icon={<FontAwesomeIcon icon={[this.childDocs?.length && !this.treeViewOpen ? 'fas' : 'far', 'circle']} />}
+ icon={<FontAwesomeIcon
+ icon={[this.childDocs?.length && !this.treeViewOpen ? 'fas' : 'far', 'circle']} />}
size={Size.XSMALL}
/>
)
) : (
<div className="treeView-bulletIcons" style={{ color: Doc.IsSystem(DocCast(this.doc.proto)) ? 'red' : undefined }}>
- <IconButton
+ {this.onCheckedClick ? <IconButton
color={color}
icon={<FontAwesomeIcon size="sm" icon={checked === 'check' ? 'check' : checked === 'x' ? 'times' : checked === 'unchecked' ? 'square' : !this.treeViewOpen ? 'caret-right' : 'caret-down'} />}
size={Size.XSMALL}
- />
- {this.onCheckedClick ? null :
- <IconButton
- color={color}
- icon={<FontAwesomeIcon icon={iconType as IconProp} />}
- size={Size.XSMALL}
- />
+ /> :
+ <IconButton
+ color={color}
+ icon={<FontAwesomeIcon icon={iconType as IconProp} />}
+ size={Size.XSMALL}
+ />
}
</div>
)}
@@ -757,15 +757,15 @@ export class TreeView extends React.Component<TreeViewProps> {
@observable headerEleWidth = 0;
@computed get titleButtons() {
const customHeaderButtons = this.props.styleProvider?.(this.doc, this.props.treeView.props, StyleProp.Decorations);
+ const color = this.props.styleProvider?.(this.doc, this.props.treeView.props, StyleProp.Color);
return this.props.treeViewHideHeaderFields() || this.doc.treeViewHideHeaderFields ? null : (
<>
{customHeaderButtons} {/* e.g.,. hide button is set by dashboardStyleProvider */}
{this.doc._layout_hideContextMenu ? null : (
- <FontAwesomeIcon
- title="context menu"
- key="bars"
- icon="bars"
- size="sm"
+ <IconButton
+ color={color}
+ icon={<FontAwesomeIcon icon="bars" />}
+ size={Size.XSMALL}
onClick={e => {
this.showContextMenu(e);
e.stopPropagation();