aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
diff options
context:
space:
mode:
authoreeng5 <eleanor_eng@brown.edu>2019-09-24 18:09:31 -0400
committereeng5 <eleanor_eng@brown.edu>2019-09-24 18:09:31 -0400
commit2e6c8efbcea67d345023db679de15f294a792dc5 (patch)
treea57277c4384a114bc2457b4c4612ec6199744afc /src/client/views/collections/CollectionStackingViewFieldColumn.tsx
parentd9b217a3a8f963096e0a1b8658a31b9df9a5f82c (diff)
Initial menu for header capabilities
Diffstat (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingViewFieldColumn.tsx31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
index c0c4750eb..aacf8ad4b 100644
--- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
@@ -20,6 +20,7 @@ import { anchorPoints, Flyout } from "../DocumentDecorations";
import { EditableView } from "../EditableView";
import { CollectionStackingView } from "./CollectionStackingView";
import "./CollectionStackingView.scss";
+import Measure from "react-measure";
library.add(faPalette);
@@ -38,6 +39,9 @@ interface CSVFieldColumnProps {
@observer
export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldColumnProps> {
@observable private _background = "inherit";
+ @observable private _selected: boolean = false;
+ @observable private _mouseX: number = 0;
+ @observable private _mouseY: number = 0;
private _dropRef: HTMLDivElement | null = null;
private dropDisposer?: DragManager.DragDropDisposer;
@@ -248,6 +252,19 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
);
}
+ renderMenu = () => {
+ return (
+ <div className="collectionStackingView-optionPicker">
+ <div className="optionOptions">
+ <div className="optionPicker">Delete</div>
+ <div className="optionPicker">Edit</div>
+ <div className="optionPicker">Collapse</div>
+ <div className="optionPicker">Alias</div>
+ </div>
+ </div>
+ );
+ }
+
@observable private collapsed: boolean = false;
private toggleVisibility = action(() => {
@@ -312,11 +329,15 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
</ Flyout >
</div>
}
- {evContents === `NO ${key.toUpperCase()} VALUE` ?
- (null) :
- <button className="collectionStackingView-sectionDelete" onClick={this.deleteColumn}>
- <FontAwesomeIcon icon="trash" />
- </button>}
+ {evContents === `NO ${key.toUpperCase()} VALUE` ? (null) :
+ <div className="collectionStackingView-sectionOptions">
+ <Flyout anchorPoint={anchorPoints.CENTER_RIGHT} content={this.renderMenu()}>
+ <button className="collectionStackingView-sectionOptionButton">
+ <FontAwesomeIcon icon="ellipsis-v" size="lg"></FontAwesomeIcon>
+ </button>
+ </Flyout>
+ </div>
+ }
</div>
</div> : (null);
for (let i = 0; i < cols; i++) templatecols += `${style.columnWidth / style.numGroupColumns}px `;