aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaHeaders.tsx
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-07-22 11:38:55 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-07-22 11:38:55 -0400
commite81cf9407966612e25b944addbc8d2a08300d0bb (patch)
tree2ba497b2875a11e9698aacbfaa02724e71da1e7d /src/client/views/collections/CollectionSchemaHeaders.tsx
parentd520956fdf3471f98bd7cde6aa28b47c1b4cbf32 (diff)
editing + nav on schema only occur when that schemaview is selected
Diffstat (limited to 'src/client/views/collections/CollectionSchemaHeaders.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaHeaders.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx
index df078eca5..3a57cd306 100644
--- a/src/client/views/collections/CollectionSchemaHeaders.tsx
+++ b/src/client/views/collections/CollectionSchemaHeaders.tsx
@@ -9,8 +9,9 @@ import { Flyout, anchorPoints } from "../DocumentDecorations";
import { ColumnType } from "./CollectionSchemaView";
import { emptyFunction } from "../../../Utils";
import { contains } from "typescript-collections/dist/lib/arrays";
+import { faFile } from "@fortawesome/free-regular-svg-icons";
-library.add(faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn);
+library.add(faPlus, faFont, faHashtag, faAlignJustify, faCheckSquare, faToggleOn, faFile);
export interface HeaderProps {
keyValue: string;
@@ -29,7 +30,7 @@ export interface HeaderProps {
export class CollectionSchemaHeader extends React.Component<HeaderProps> {
render() {
let icon: IconProp = this.props.keyType === ColumnType.Number ? "hashtag" : this.props.keyType === ColumnType.String ? "font" :
- this.props.keyType === ColumnType.Boolean ? "check-square" : "align-justify";
+ this.props.keyType === ColumnType.Boolean ? "check-square" : this.props.keyType === ColumnType.Doc ? "file" : "align-justify";
return (
<div className="collectionSchemaView-header" >
@@ -145,6 +146,9 @@ export class CollectionSchemaColumnMenu extends React.Component<ColumnMenuProps>
<button title="Checkbox" className={this.props.keyType === ColumnType.Boolean ? "active" : ""} onClick={() => this.props.setColumnType(this.props.keyValue, ColumnType.Boolean)}>
<FontAwesomeIcon icon={"check-square"} size="sm" />
</button>
+ <button title="Document" className={this.props.keyType === ColumnType.Doc ? "active" : ""} onClick={() => this.props.setColumnType(this.props.keyValue, ColumnType.Doc)}>
+ <FontAwesomeIcon icon={"file"} size="sm" />
+ </button>
</div>
</div>
);