aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-23 03:36:21 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-23 03:36:21 -0400
commitb2691d6119dfa1f192ac6eb19650f44742b253f5 (patch)
tree5ba18b5eb0181326a2ff2c517852ab8fd2d824c7 /src/client/views/collections/collectionSchema/SchemaRowBox.tsx
parent9fab1b3ac096138fba3a99a2515ec44b526a3956 (diff)
col filling (really external setting of cell fieldval) works properly (reaction); moved 'remove doc' option to bottom of row menu
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 45f178815..d2c0d891f 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -61,11 +61,6 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
openContextMenu = (x: number, y: number) => {
ContextMenu.Instance.clearItems();
ContextMenu.Instance.addItem({
- description: `Close doc`,
- event: () => this.schemaView.removeDoc(this.Document),
- icon: 'minus',
- });
- ContextMenu.Instance.addItem({
description: this.Document._lockedSchemaEditing ? 'Unlock field editing' : 'Lock field editing',
event: () => this.Document._lockedSchemaEditing = !this.Document._lockedSchemaEditing,
icon: this.Document._lockedSchemaEditing ? 'lock-open' : 'lock',
@@ -75,6 +70,11 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
event: () => this._props.addDocTab(this.Document, OpenWhere.addRight),
icon: 'magnifying-glass',
});
+ ContextMenu.Instance.addItem({
+ description: `Close doc`,
+ event: () => this.schemaView.removeDoc(this.Document),
+ icon: 'minus',
+ });
const childDocs = DocListCast(this.Document[Doc.LayoutFieldKey(this.Document)])
if (this.Document.type === 'collection' && childDocs.length) {
ContextMenu.Instance.addItem({
@@ -119,7 +119,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
selectCell = (doc: Doc, col: number, shift: boolean, ctrl: boolean) => this.schemaView?.selectCell(doc, col, shift, ctrl);
deselectCell = () => this.schemaView?.deselectAllCells();
selectedCells = () => this.schemaView?._selectedDocs;
- setColumnValues = (field: any, value: any) => this.schemaView?.setCellValues(field, value) ?? false;
+ setColumnValues = (field: any, value: any) => this.schemaView?.setColumnValues(field, value) ?? false;
columnWidth = computedFn((index: number) => () => this.schemaView?.displayColumnWidths[index] ?? CollectionSchemaView._minColWidth);
computeRowIndex = () => this.schemaView?.rowIndex(this.Document);
highlightCells = (text: string) => this.schemaView?.highlightCells(text);
@@ -130,7 +130,6 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
const info = this.schemaView.findCellRefs(text);
const cells: HTMLDivElement[] = [];
info.forEach(info => {cells.push(this.schemaView.getCellElement(info[0], info[1]))})
- console.log('info: ' + info + ' cells: ' + cells);
return cells;
};
render() {