diff options
| author | ljungster <parkerljung@gmail.com> | 2022-04-11 20:16:40 -0400 |
|---|---|---|
| committer | ljungster <parkerljung@gmail.com> | 2022-04-11 20:16:40 -0400 |
| commit | 1e044cdb3d9004a42dfce5de83f518e95aebaf40 (patch) | |
| tree | 10a33aa97591d275fb7a70df5da41afbbf5c0e70 /src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx | |
| parent | 5476f6160a357fe697314e6171ff560260c1d301 (diff) | |
items get dragged and dropped
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx index 6d95eeb0c..1df5cc504 100644 --- a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx +++ b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx @@ -140,7 +140,6 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel return } if (this.props.columnHeaders.length == 1) { - // (1) length is 1, alert user can't delete alert("You can't delete the last column! Going to remove delete button soon") return } @@ -163,6 +162,7 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel //TODO: I think this is where I'm supposed to edit stuff startDrag = (e: PointerEvent, down: number[], delta: number[]) => { + console.log('in startDrag') // is MakeAlias a way to make a copy of a doc without rendering it? const alias = Doc.MakeAlias(this.props.Document); alias._width = this.props.columnWidth / (this.props.columnHeaders?.length || 1); @@ -171,7 +171,9 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel value = typeof value === "string" ? `"${value}"` : value; alias.viewSpecScript = ScriptField.MakeFunction(`doc.${this.props.pivotField} === ${value}`, { doc: Doc.name }); if (alias.viewSpecScript) { - DragManager.StartDocumentDrag([this._headerRef.current!], new DragManager.DocumentDragData([alias]), e.clientX, e.clientY); + const options = {hideSource: false} + DragManager.StartDocumentDrag([this._headerRef.current!], new DragManager.DocumentDragData([alias]), e.clientX, e.clientY, options); + console.log('in startDrag') return true; } return false; @@ -340,9 +342,7 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component<CSVFiel render() { TraceMobx(); const headings = this.props.headings(); - // We will have to see what this is const heading = this._heading; - console.log(`Column heading: ${heading}`) const uniqueHeadings = headings.map((i, idx) => headings.indexOf(i) === idx); return ( <div className={"collectionStackingViewFieldColumn" + (SnappingManager.GetIsDragging() ? "Dragging" : "")} key={heading} |
