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-07-01 16:38:24 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-07-01 16:38:24 -0400
commit3dd0a92767972736f415341c0b6e06e6e3a242b1 (patch)
tree8bd0ae3b7ace187cd96e257a82d3b796d826552e /src/client/views/collections/collectionSchema/SchemaRowBox.tsx
parenta4199d30b81c464fd7ff15eee1fc56f432ee53a3 (diff)
highlighting then un-highlighting a selected cell with equations now properly maintains original select highlight
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 9ac7a24b2..2410b2793 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -101,23 +101,14 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
return infos;
}
- @computed get isolatedSelection() {
- const toReturn: [boolean, boolean] = [true, true];
- const docs = this.schemaView.docsWithDrag.docs;
- const selectedBelow: boolean = this.schemaView?._selectedDocs.includes(docs[this.rowIndex + 1]);
- const selectedAbove: boolean = this.schemaView?._selectedDocs.includes(docs[this.rowIndex - 1]);
- toReturn[0] = selectedAbove;
- toReturn[1] = selectedBelow;
- return toReturn;
- }
-
+ isolatedSelection = (doc: Doc) => {return this.schemaView?.selectionOverlap(doc)};
setCursorIndex = (mouseY: number) => this.schemaView?.setRelCursorIndex(mouseY);
selectedCol = () => this.schemaView._selectedCol;
getFinfo = computedFn((fieldKey: string) => this.schemaView?.fieldInfos.get(fieldKey));
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?.setColumnValues(field, value) ?? false;
+ setColumnValues = (field: any, value: any) => this.schemaView?.setCellValues(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);