diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-03-18 03:34:42 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-03-18 03:34:42 -0400 |
commit | fdf02e0b421f98512378b21a6435c87da92ecd30 (patch) | |
tree | a932b9a3036b6db9731a60454cf2b05d2b2e0ced | |
parent | 6b87703bff0e26489ae5e7757b7a622a7143a51d (diff) |
c
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 5 | ||||
-rw-r--r-- | src/client/views/collections/collectionSchema/SchemaRowBox.tsx | 1 |
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(); |