aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-09-22 15:29:28 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-09-22 15:29:28 -0400
commitd8a43b76f101a2f38ef1e3e9cbf8ec036468481d (patch)
tree08fea673e890c1e3b5c22d7a58d6c06c45fdc1fe /src/client/views/collections/collectionSchema/SchemaTableCell.tsx
parent24c6c3f0c9b43059cd013d344dfa065969f73389 (diff)
header comments + change to cellfield updating
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaTableCell.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaTableCell.tsx15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
index e2a05da7f..1bca3c84d 100644
--- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
@@ -30,12 +30,17 @@ import { Colors } from '../../global/globalEnums';
import { DocumentView } from '../../nodes/DocumentView';
import { FieldViewProps } from '../../nodes/FieldView';
import { FormattedTextBox } from '../../nodes/formattedText/FormattedTextBox';
-import { CollectionSchemaView, FInfotoColType } from './CollectionSchemaView';
+import { FInfotoColType } from './CollectionSchemaView';
import './CollectionSchemaView.scss';
import { SchemaColumnHeader } from './SchemaColumnHeader';
-import { ContextMenu } from '../../ContextMenu';
import { SchemaCellField } from './SchemaCellField';
+/**
+ * SchemaTableCells make up the majority of the visual representation of the SchemaView.
+ * They are rendered for each cell in the SchemaView, and each represents one field value
+ * of a doc. Editing the content of the cell changes the corresponding doc's field value.
+ */
+
export interface SchemaTableCellProps {
Document: Doc;
col: number;
@@ -62,7 +67,6 @@ export interface SchemaTableCellProps {
rowSelected: () => boolean;
isolatedSelection: (doc: Doc) => [boolean, boolean];
highlightCells: (text: string) => void;
- equationHighlightRef: ObservableMap<HTMLDivElement, string>;
eqHighlightFunc: (text: string) => HTMLDivElement[] | [];
refSelectModeInfo: {enabled: boolean, currEditing: SchemaCellField | undefined};
selectReference: (doc: Doc, col: number) => void;
@@ -143,11 +147,6 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro
return { color, textDecoration, fieldProps, cursor, pointerEvents };
}
- // @action
- // appendTextToField = (text: string) => {
- // this._fieldRef?.appendText(text);
- // }
-
adjustSelfReference = (field: string) => {
const modField = field.replace(/\bthis.\b/g, `d${this.docIndex}.`);
return modField;