aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx5
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index e6c13d11e..d179a00ca 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -85,6 +85,7 @@ export class CollectionSchemaView extends CollectionSubView() {
@observable _menuValue: string = '';
@observable _filterColumnIndex: number | undefined = undefined;
@observable _filterSearchValue: string = '';
+ //Doc = the row; number = the index of the cell to select within the row
@observable _selectedCell: [Doc, number] | undefined = undefined;
// target HTMLelement portal for showing a popup menu to edit cell values.
@@ -195,7 +196,7 @@ export class CollectionSchemaView extends CollectionSubView() {
} else {
this.addDocToSelection(newDoc, true, lastIndex + 1);
this.addDocToSelection(newDoc2, true, lastIndex + 2);
- //this._selectedCell && (this._selectedCell[0] = newDoc);
+ this._selectedCell && (this._selectedCell[0] = newDoc);
this.scrollToDoc(newDoc, {});
}
}
@@ -413,6 +414,7 @@ export class CollectionSchemaView extends CollectionSubView() {
@action
addDocToSelection = (doc: Doc, extendSelection: boolean, index: number) => {
+ console.log("addDoc called");
const rowDocView = DocumentManager.Instance.getDocumentView(doc);
if (rowDocView) SelectionManager.SelectView(rowDocView, extendSelection);
};
@@ -422,6 +424,7 @@ export class CollectionSchemaView extends CollectionSubView() {
SelectionManager.DeselectAll()
};
+ //This method is called in SchemaRowBox.select, which is never called anywhere
selectRows = (doc: Doc, lastSelected: Doc) => {
const index = this.rowIndex(doc);
const lastSelectedRow = this.rowIndex(lastSelected);
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 8cbb4ded8..c30eee237 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -53,6 +53,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
this._props.setContentViewBox?.(this);
}
+ //This method is never called anywhere
select = (ctrlKey: boolean, shiftKey: boolean) => {
if (!this.schemaView) return;
const lastSelected = Array.from(this.schemaView._selectedDocs).lastElement();