diff options
| author | bobzel <zzzman@gmail.com> | 2022-06-30 15:13:54 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-06-30 15:13:54 -0400 |
| commit | cf6de0bb501c2e3b64269494d6c0e0305c775eb3 (patch) | |
| tree | e041e9fd5136ae4d359b6d476bc9ae172e109f6b /src/client/views/collections/CollectionStackingViewFieldColumn.tsx | |
| parent | bb02d3a052efdbf25d1069059a92b7a9d9cc1708 (diff) | |
| parent | ea6e63648b21c46672b1b7cb1da0cbaa6857d0c1 (diff) | |
Merge branch 'master' into parker
Diffstat (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingViewFieldColumn.tsx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx index c191445e7..d29c0b183 100644 --- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx +++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx @@ -61,6 +61,7 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC @observable _paletteOn = false; @observable _heading = this.props.headingObject ? this.props.headingObject.heading : this.props.heading; @observable _color = this.props.headingObject ? this.props.headingObject.color : "#f1efeb"; + _ele: HTMLElement | null = null; // This is likely similar to what we will be doing. Why do we need to make these refs? @@ -73,6 +74,7 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC this.dropDisposer = DragManager.MakeDropTarget(ele, this.columnDrop.bind(this)); } } + componentWillUnmount() { this.props.unobserveHeight(this._ele); } @@ -229,8 +231,8 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC } }, icon: "compress-arrows-alt" })); - !Doc.UserDoc().noviceMode && ContextMenu.Instance.addItem({ description: "Doc Fields ...", subitems: docItems, icon: "eye" }); - !Doc.UserDoc().noviceMode && ContextMenu.Instance.addItem({ description: "Containers ...", subitems: layoutItems, icon: "eye" }); + !Doc.noviceMode && ContextMenu.Instance.addItem({ description: "Doc Fields ...", subitems: docItems, icon: "eye" }); + !Doc.noviceMode && ContextMenu.Instance.addItem({ description: "Containers ...", subitems: layoutItems, icon: "eye" }); ContextMenu.Instance.setDefaultItem("::", (name: string): void => { Doc.GetProto(this.props.Document)[name] = ""; const created = Docs.Create.TextDocument("", { title: name, _width: 250, _autoHeight: true }); @@ -244,6 +246,9 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC const pt = this.props.screenToLocalTransform().inverse().transformPoint(x, y); ContextMenu.Instance.displayMenu(x, y, undefined, true); } + + + @computed get innards() { TraceMobx(); const key = this.props.pivotField; @@ -330,9 +335,10 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC placeholder={"Type ':' for commands"} contents={<FontAwesomeIcon icon={"plus"}/>} toggle={this.toggleVisibility} - menuCallback={this.menuCallback} - /> - </div> : null} + menuCallback={this.menuCallback} /> + </div> + : null + } </div> } </>; |
