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-25 01:14:06 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-25 01:14:06 -0400
commit6a3d0cc899020710d5b9aabe164649c686467024 (patch)
tree196723923cb95764a5f174309d7e890f052aa402 /src/client/views/collections/collectionSchema/SchemaRowBox.tsx
parent227a289e49019ad1e9f634b098bb564bd4a8e743 (diff)
progress on refSelect (single click to add cell to equation)
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index d2c0d891f..b15804d41 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -96,6 +96,10 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
return ''
}
+ @computed get refSelectModeInfo() {
+ return this.schemaView._referenceSelectMode;
+ }
+
@computed get menuInfos() {
const infos: Array<IconProp> = [];
if (this.Document._lockedSchemaEditing) infos.push('lock');
@@ -123,9 +127,6 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
columnWidth = computedFn((index: number) => () => this.schemaView?.displayColumnWidths[index] ?? CollectionSchemaView._minColWidth);
computeRowIndex = () => this.schemaView?.rowIndex(this.Document);
highlightCells = (text: string) => this.schemaView?.highlightCells(text);
- equationHighlightRef = (text: string) => {
-
- }
eqHighlightFunc = (text: string) => {
const info = this.schemaView.findCellRefs(text);
const cells: HTMLDivElement[] = [];
@@ -174,6 +175,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
<div className="row-cells">
{this.schemaView?.columnKeys?.map((key, index) => (
<SchemaTableCell
+ refSelectModeInfo={this.refSelectModeInfo}
func={this.eqHighlightFunc}
equationHighlightRef={this.schemaView._cellHighlightColors}
highlightCells={this.highlightCells}