From 8cc8c972c73ea52e6be3d6dc25d9abc6905327df Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Tue, 19 Mar 2024 17:49:44 -0400 Subject: routing select through selectCell; shift select kind of working; cell selection updating still broken; cell select with shift select broken --- src/client/views/nodes/formattedText/DashFieldView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index b49e7dcf0..b0c35b161 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -140,7 +140,7 @@ export class DashFieldViewInternal extends ObservableReactComponent this._props.tbox._props.PanelWidth() - 20 : returnZero} - selectedCell={() => [this._dashDoc!, 0]} + selectedCells={() => [this._dashDoc!, 0]} fieldKey={this._fieldKey} rowHeight={returnZero} isRowActive={() => this._expanded && this._props.editable} -- cgit v1.2.3-70-g09d2 From a598877cc71c1f2a25e8cac4b831ab947a2539e0 Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Thu, 21 Mar 2024 00:05:32 -0400 Subject: editing all selected cols working --- .../collectionSchema/CollectionSchemaView.tsx | 84 +++++++++++++++------- .../collections/collectionSchema/SchemaRowBox.tsx | 2 + .../collectionSchema/SchemaTableCell.tsx | 14 +++- .../views/nodes/formattedText/DashFieldView.tsx | 3 +- 4 files changed, 75 insertions(+), 28 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 33ae8aad1..60b3ae4ab 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -190,13 +190,14 @@ export class CollectionSchemaView extends CollectionSubView() { const lastIndex = this.rowIndex(lastDoc); const curDoc = this.sortedDocs.docs[lastIndex]; if (lastIndex >= 0 && lastIndex < this.childDocs.length - 1) { - !e.shiftKey && this.clearSelection(); const newDoc = this.sortedDocs.docs[lastIndex + 1]; if (this._selectedDocs.includes(newDoc)) { SelectionManager.DeselectView(DocumentManager.Instance.getFirstDocumentView(curDoc)); + this.deselectCell(curDoc); + } else { - this.addDocToSelection(newDoc, e.shiftKey, lastIndex + 1); - this.selectCell(newDoc, this._selectedCells ? this._selectedCells[1] : 0, false); + const shift: boolean = e.shiftKey; + this.selectCell(newDoc, this._selectedCells ? this._selectedCells[1] : 2, shift); this.scrollToDoc(newDoc, {}); } } @@ -210,12 +211,14 @@ export class CollectionSchemaView extends CollectionSubView() { const firstIndex = this.rowIndex(firstDoc); const curDoc = this.sortedDocs.docs[firstIndex]; if (firstIndex > 0 && firstIndex < this.childDocs.length) { - !e.shiftKey && this.clearSelection(); const newDoc = this.sortedDocs.docs[firstIndex - 1]; - if (this._selectedDocs.includes(newDoc)) SelectionManager.DeselectView(DocumentManager.Instance.getFirstDocumentView(curDoc)); - else { - this.addDocToSelection(newDoc, e.shiftKey, firstIndex - 1); - this.selectCell(newDoc, this._selectedCells ? this._selectedCells[1] + 1 : 0, false); + if (this._selectedDocs.includes(newDoc)){ + SelectionManager.DeselectView(DocumentManager.Instance.getFirstDocumentView(curDoc)) + this.deselectCell(curDoc); + } else { + const shift: boolean = e.shiftKey; + + this.selectCell(newDoc, this._selectedCells ? this._selectedCells[1] : 2, shift); this.scrollToDoc(newDoc, {}); } } @@ -231,7 +234,13 @@ export class CollectionSchemaView extends CollectionSubView() { } break; case 'ArrowLeft': - this.changeSelectedCellColumn(); + if (this._selectedCells) { + this._selectedCells = undefined; + //this._selectedCells = [this._selectedCells[0], 2] + //this._selectedCells[1] = Math.max(this._selectedCells[1] - 1, 0); + } else if (this._selectedDocs.length > 0) { + this.selectCell(this._selectedDocs[0], 0, false); + } break; case 'Backspace': { this.removeDocument(this._selectedDocs); @@ -246,11 +255,7 @@ export class CollectionSchemaView extends CollectionSubView() { @action changeSelectedCellColumn = () => { - if (this._selectedCells) { - this._selectedCells[1] = Math.max(this._selectedCells[1] - 1, 0); - } else if (this._selectedDocs.length > 0) { - this.selectCell(this._selectedDocs[0], 0, false); - } + } @undoBatch @@ -422,11 +427,14 @@ export class CollectionSchemaView extends CollectionSubView() { //console.log("doc added"); const rowDocView = DocumentManager.Instance.getDocumentView(doc); if (rowDocView) SelectionManager.SelectView(rowDocView, extendSelection); + //let selectedIndexes: Array = this._selectedDocs.map(doc => this.rowIndex(doc)); + //console.log(selectedIndexes); }; @action clearSelection = () => { - SelectionManager.DeselectAll() + SelectionManager.DeselectAll(); + this.deselectAllCells(); }; //This method is called in SchemaRowBox.select, which is never called anywhere @@ -435,33 +443,41 @@ export class CollectionSchemaView extends CollectionSubView() { const lastSelectedRow = this.rowIndex(lastSelected); const startRow = Math.min(lastSelectedRow, index); const endRow = Math.max(lastSelectedRow, index); - console.log(lastSelectedRow); - console.log("start: " + startRow + " end: " + endRow); + //console.log(lastSelectedRow); + //console.log("start: " + startRow + " end: " + endRow); for (let i = startRow; i <= endRow; i++) { const currDoc = this.sortedDocs.docs[i]; if (!this._selectedDocs.includes(currDoc)) this.addDocToSelection(currDoc, true, i); + this._selectedCells && this._selectedCells[0].push(currDoc); } }; @action selectCell = (doc: Doc, index: number, shiftKey: boolean) => { - //console.log("cellSelect"); - //console.log(shiftKey); - shiftKey = true; - !this._selectedCells && (this._selectedCells = [[doc], index]); + !shiftKey && this.deselectAllCells(); + !this._selectedCells && (this._selectedCells = [[], index]); this._selectedCells[0].push(doc); this._selectedCells[1] = index; + if (!this) return; const lastSelected = Array.from(this._selectedDocs).lastElement(); if (shiftKey && lastSelected) this.selectRows(doc, lastSelected); else { - this.addDocToSelection(doc, false, 0); + this.addDocToSelection(doc, false, this.rowIndex(doc)); } + + let selectedIndexes: Array = this._selectedCells[0].map(doc => this.rowIndex(doc)); + console.log("cells: " + selectedIndexes); }; @action deselectCell = (doc: Doc) => { - this._selectedCells && this._selectedCells[0].filter(d => d !== doc); + if (this._selectedCells) + this._selectedCells[0] = this._selectedCells[0].filter(d => d !== doc); + if (this._selectedCells){ + let selectedIndexes: Array = this._selectedCells[0].map(doc => this.rowIndex(doc)); + console.log("cells: " + selectedIndexes); + } }; @action @@ -590,7 +606,27 @@ export class CollectionSchemaView extends CollectionSubView() { }; setColumnValues = (key: string, value: string) => { - this.childDocs.forEach(doc => KeyValueBox.SetField(doc, key, value)); + this.childDocs.forEach(doc => { + let docIsSelected = this._selectedCells && !(this._selectedCells[0]?.filter(d => d === doc).length === 0); + console.log(docIsSelected); + if (docIsSelected){ + KeyValueBox.SetField(doc, key, value) + } + } + ); + //this.childDocs.forEach(doc => KeyValueBox.SetField(doc, key, value)); + return true; + }; + + setSelectedColumnValues = (key: string, value: string) => { + console.log("called"); + this.childDocs.forEach(doc => { + let docIsSelected = this._selectedCells && !(this._selectedCells[0]?.filter(d => d === doc).length === 0); + if (docIsSelected){ + KeyValueBox.SetField(doc, key, value) + } + } + ); return true; }; diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx index 0ef78fe07..af502dd03 100644 --- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx +++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx @@ -103,6 +103,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent() { deselectCell = () => this.schemaView?.deselectAllCells(); selectedCell = () => this.schemaView?._selectedCells; setColumnValues = (field: any, value: any) => this.schemaView?.setColumnValues(field, value) ?? false; + setSelectedColumnValues = (field: any, value: any) => this.schemaView?.setSelectedColumnValues(field, value) ?? false; columnWidth = computedFn((index: number) => () => this.schemaView?.displayColumnWidths[index] ?? CollectionSchemaView._minColWidth); render() { return ( @@ -188,6 +189,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent() { deselectCell={this.deselectCell} selectedCells={this.selectedCell} setColumnValues={this.setColumnValues} + setSelectedColumnValues={this.setSelectedColumnValues} oneLine={BoolCast(this.schemaDoc?._singleLine)} menuTarget={this.schemaView.MenuTarget} transform={() => { diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index 2769b5042..cae16be36 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -45,6 +45,7 @@ export interface SchemaTableCellProps { isRowActive: () => boolean | undefined; getFinfo: (fieldKey: string) => FInfo | undefined; setColumnValues: (field: string, value: string) => boolean; + setSelectedColumnValues: (field: string, value: string) => boolean; oneLine?: boolean; // whether all input should fit on one line vs allowing textare multiline inputs allowCRs?: boolean; // allow carriage returns in text input (othewrise CR ends the edit) finishEdit?: () => void; // notify container that edit is over (eg. to hide view in DashFieldView) @@ -107,7 +108,7 @@ export class SchemaTableCell extends ObservableReactComponent doc === this._props.Document).length !== 0) && selected[1] === this._props.col; //console.log("col: " + this._props.col + "true: " + istrue); return istrue; @@ -135,7 +136,9 @@ export class SchemaTableCell extends ObservableReactComponent { if (shiftDown && enterKey) { this._props.setColumnValues(this._props.fieldKey.replace(/^_/, ''), value); - } + } /*else { + this._props.setSelectedColumnValues(this._props.fieldKey.replace(/^_/, ''), value); + }*/ const ret = KeyValueBox.SetField(this._props.Document, this._props.fieldKey.replace(/^_/, ''), value); this._props.finishEdit?.(); return ret; @@ -179,7 +182,12 @@ export class SchemaTableCell extends ObservableReactComponent !this.selected && this._props.selectCell(this._props.Document, this._props.col, e.shiftKey))} + onPointerDown={action(e => { + console.log(e); + console.log(e.shiftKey); + const shift: boolean = e.shiftKey; + !this.selected && this._props.selectCell(this._props.Document, this._props.col, shift)} + )} style={{ padding: this._props.padding, maxWidth: this._props.maxWidth?.(), width: this._props.columnWidth() || undefined, border: this.selected ? `solid 2px ${Colors.MEDIUM_BLUE}` : undefined }}> {this.content} diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index b0c35b161..631de1241 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -140,13 +140,14 @@ export class DashFieldViewInternal extends ObservableReactComponent this._props.tbox._props.PanelWidth() - 20 : returnZero} - selectedCells={() => [this._dashDoc!, 0]} + selectedCells={() => [[this._dashDoc!], 0]} fieldKey={this._fieldKey} rowHeight={returnZero} isRowActive={() => this._expanded && this._props.editable} padding={0} getFinfo={emptyFunction} setColumnValues={returnFalse} + setSelectedColumnValues={returnFalse} allowCRs={true} oneLine={!this._expanded} finishEdit={action(() => (this._expanded = false))} -- cgit v1.2.3-70-g09d2 From 9ccbc0a6d6f6fffbc479d37ac2a880eafe85c65d Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Thu, 21 Mar 2024 00:43:08 -0400 Subject: multiple cell column switching working --- .../collectionSchema/CollectionSchemaView.tsx | 35 +++++++++++----------- .../collections/collectionSchema/SchemaRowBox.tsx | 6 ++-- .../collectionSchema/SchemaTableCell.tsx | 15 +++++----- .../views/nodes/formattedText/DashFieldView.tsx | 3 +- 4 files changed, 32 insertions(+), 27 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 60b3ae4ab..e722e774d 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -87,8 +87,9 @@ export class CollectionSchemaView extends CollectionSubView() { @observable _filterColumnIndex: number | undefined = undefined; @observable _filterSearchValue: string = ''; //an array of selected docs and the index representing the selected column - @observable selectedCol: number = 0; - @observable _selectedCells: [Array, number] | undefined; + @observable _selectedCol: number = 0; + @observable _selectedCells: Array | undefined; + // target HTMLelement portal for showing a popup menu to edit cell values. public get MenuTarget() { @@ -197,7 +198,7 @@ export class CollectionSchemaView extends CollectionSubView() { } else { const shift: boolean = e.shiftKey; - this.selectCell(newDoc, this._selectedCells ? this._selectedCells[1] : 2, shift); + this.selectCell(newDoc, this._selectedCol, shift); this.scrollToDoc(newDoc, {}); } } @@ -218,7 +219,7 @@ export class CollectionSchemaView extends CollectionSubView() { } else { const shift: boolean = e.shiftKey; - this.selectCell(newDoc, this._selectedCells ? this._selectedCells[1] : 2, shift); + this.selectCell(newDoc, this._selectedCol, shift); this.scrollToDoc(newDoc, {}); } } @@ -228,16 +229,14 @@ export class CollectionSchemaView extends CollectionSubView() { break; case 'ArrowRight': if (this._selectedCells) { - this.selectCell(this._selectedCells[0][0], this._selectedCells[1] + 1, false); + ++this._selectedCol; } else if (this._selectedDocs.length > 0) { this.selectCell(this._selectedDocs[0], 0, false); } break; case 'ArrowLeft': if (this._selectedCells) { - this._selectedCells = undefined; - //this._selectedCells = [this._selectedCells[0], 2] - //this._selectedCells[1] = Math.max(this._selectedCells[1] - 1, 0); + --this._selectedCol; } else if (this._selectedDocs.length > 0) { this.selectCell(this._selectedDocs[0], 0, false); } @@ -448,16 +447,16 @@ export class CollectionSchemaView extends CollectionSubView() { for (let i = startRow; i <= endRow; i++) { const currDoc = this.sortedDocs.docs[i]; if (!this._selectedDocs.includes(currDoc)) this.addDocToSelection(currDoc, true, i); - this._selectedCells && this._selectedCells[0].push(currDoc); + this._selectedCells && this._selectedCells.push(currDoc); } }; @action selectCell = (doc: Doc, index: number, shiftKey: boolean) => { !shiftKey && this.deselectAllCells(); - !this._selectedCells && (this._selectedCells = [[], index]); - this._selectedCells[0].push(doc); - this._selectedCells[1] = index; + !this._selectedCells && (this._selectedCells = []); + this._selectedCells.push(doc); + this._selectedCol = index; if (!this) return; const lastSelected = Array.from(this._selectedDocs).lastElement(); @@ -466,16 +465,18 @@ export class CollectionSchemaView extends CollectionSubView() { this.addDocToSelection(doc, false, this.rowIndex(doc)); } - let selectedIndexes: Array = this._selectedCells[0].map(doc => this.rowIndex(doc)); + let selectedIndexes: Array = this._selectedCells.map(doc => this.rowIndex(doc)); console.log("cells: " + selectedIndexes); + console.log("index: " + this._selectedCol); + }; @action deselectCell = (doc: Doc) => { if (this._selectedCells) - this._selectedCells[0] = this._selectedCells[0].filter(d => d !== doc); + this._selectedCells = this._selectedCells.filter(d => d !== doc); if (this._selectedCells){ - let selectedIndexes: Array = this._selectedCells[0].map(doc => this.rowIndex(doc)); + let selectedIndexes: Array = this._selectedCells.map(doc => this.rowIndex(doc)); console.log("cells: " + selectedIndexes); } }; @@ -607,7 +608,7 @@ export class CollectionSchemaView extends CollectionSubView() { setColumnValues = (key: string, value: string) => { this.childDocs.forEach(doc => { - let docIsSelected = this._selectedCells && !(this._selectedCells[0]?.filter(d => d === doc).length === 0); + let docIsSelected = this._selectedCells && !(this._selectedCells?.filter(d => d === doc).length === 0); console.log(docIsSelected); if (docIsSelected){ KeyValueBox.SetField(doc, key, value) @@ -621,7 +622,7 @@ export class CollectionSchemaView extends CollectionSubView() { setSelectedColumnValues = (key: string, value: string) => { console.log("called"); this.childDocs.forEach(doc => { - let docIsSelected = this._selectedCells && !(this._selectedCells[0]?.filter(d => d === doc).length === 0); + let docIsSelected = this._selectedCells && !(this._selectedCells?.filter(d => d === doc).length === 0); if (docIsSelected){ KeyValueBox.SetField(doc, key, value) } diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx index af502dd03..e3654facb 100644 --- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx +++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx @@ -98,10 +98,11 @@ export class SchemaRowBox extends ViewBoxBaseComponent() { document.removeEventListener('pointermove', this.onPointerMove); }; + selectedCol = () => this.schemaView._selectedCol; getFinfo = computedFn((fieldKey: string) => this.schemaView?.fieldInfos.get(fieldKey)); selectCell = (doc: Doc, col: number, shift: boolean) => this.schemaView?.selectCell(doc, col, shift); deselectCell = () => this.schemaView?.deselectAllCells(); - selectedCell = () => this.schemaView?._selectedCells; + selectedCells = () => this.schemaView?._selectedCells; setColumnValues = (field: any, value: any) => this.schemaView?.setColumnValues(field, value) ?? false; setSelectedColumnValues = (field: any, value: any) => this.schemaView?.setSelectedColumnValues(field, value) ?? false; columnWidth = computedFn((index: number) => () => this.schemaView?.displayColumnWidths[index] ?? CollectionSchemaView._minColWidth); @@ -187,7 +188,8 @@ export class SchemaRowBox extends ViewBoxBaseComponent() { getFinfo={this.getFinfo} selectCell={this.selectCell} deselectCell={this.deselectCell} - selectedCells={this.selectedCell} + selectedCells={this.selectedCells} + selectedCol={this.selectedCol} setColumnValues={this.setColumnValues} setSelectedColumnValues={this.setSelectedColumnValues} oneLine={BoolCast(this.schemaDoc?._singleLine)} diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index cae16be36..52c34e8d6 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -36,7 +36,8 @@ export interface SchemaTableCellProps { col: number; deselectCell: () => void; selectCell: (doc: Doc, col: number, shift: boolean) => void; - selectedCells: () => [Doc[], number] | undefined; + selectedCells: () => Doc[] | undefined; + selectedCol: () => number; fieldKey: string; maxWidth?: () => number; columnWidth: () => number; @@ -108,9 +109,9 @@ export class SchemaTableCell extends ObservableReactComponent doc === this._props.Document).length !== 0) && selected[1] === this._props.col; - //console.log("col: " + this._props.col + "true: " + istrue); + const selected: Doc[] | undefined = this._props.selectedCells(); + let istrue = this._props.isRowActive() && (selected && selected?.filter(doc => doc === this._props.Document).length !== 0) && this._props.selectedCol() === this._props.col; + console.log("col: " + this._props.col + " selCol: " + this._props.selectedCol() + " true: " + istrue); return istrue; } @@ -320,7 +321,7 @@ export class SchemaRTFCell extends ObservableReactComponent doc === this._props.Document).length !== 0) && selected[1] === this._props.col; + return this._props.isRowActive() && (selected && selected?.filter(doc => doc === this._props.Document).length !== 0) && this._props.selectedCol() === this._props.col; //return this._props.isRowActive() && selected?.[0] === this._props.Document && selected[1] === this._props.col; } selectedFunc = () => this.selected; @@ -343,7 +344,7 @@ export class SchemaBoolCell extends ObservableReactComponent doc === this._props.Document).length !== 0) && selected[1] === this._props.col; + return this._props.isRowActive() && (selected && selected?.filter(doc => doc === this._props.Document).length !== 0) && this._props.selectedCol() === this._props.col; } render() { const { color, textDecoration, fieldProps, cursor, pointerEvents } = SchemaTableCell.renderProps(this._props); @@ -387,7 +388,7 @@ export class SchemaEnumerationCell extends ObservableReactComponent doc === this._props.Document).length !== 0) && selected[1] === this._props.col; + return this._props.isRowActive() && (selected && selected?.filter(doc => doc === this._props.Document).length !== 0) && this._props.selectedCol() === this._props.col; } render() { const { color, textDecoration, fieldProps, cursor, pointerEvents } = SchemaTableCell.renderProps(this._props); diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index 631de1241..66db06d69 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -140,7 +140,8 @@ export class DashFieldViewInternal extends ObservableReactComponent this._props.tbox._props.PanelWidth() - 20 : returnZero} - selectedCells={() => [[this._dashDoc!], 0]} + selectedCells={() => [this._dashDoc!]} + selectedCol={() => 0} //!!! fieldKey={this._fieldKey} rowHeight={returnZero} isRowActive={() => this._expanded && this._props.editable} -- cgit v1.2.3-70-g09d2 From efcacfa867ac7ac39d97ed2fe33c1311b912ca0f Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Thu, 21 Mar 2024 00:55:34 -0400 Subject: the decommenting --- .../collections/collectionSchema/CollectionSchemaView.tsx | 10 ---------- .../views/collections/collectionSchema/SchemaTableCell.tsx | 3 --- src/client/views/nodes/formattedText/DashFieldView.tsx | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index d583ffd03..b2942cc47 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -423,11 +423,8 @@ export class CollectionSchemaView extends CollectionSubView() { @action addDocToSelection = (doc: Doc, extendSelection: boolean, index: number) => { - //console.log("doc added"); const rowDocView = DocumentManager.Instance.getDocumentView(doc); if (rowDocView) SelectionManager.SelectView(rowDocView, extendSelection); - //let selectedIndexes: Array = this._selectedDocs.map(doc => this.rowIndex(doc)); - //console.log(selectedIndexes); }; @action @@ -442,8 +439,6 @@ export class CollectionSchemaView extends CollectionSubView() { const lastSelectedRow = this.rowIndex(lastSelected); const startRow = Math.min(lastSelectedRow, index); const endRow = Math.max(lastSelectedRow, index); - //console.log(lastSelectedRow); - //console.log("start: " + startRow + " end: " + endRow); for (let i = startRow; i <= endRow; i++) { const currDoc = this.sortedDocs.docs[i]; if (!this._selectedDocs.includes(currDoc)) this.addDocToSelection(currDoc, true, i); @@ -466,8 +461,6 @@ export class CollectionSchemaView extends CollectionSubView() { } let selectedIndexes: Array = this._selectedCells.map(doc => this.rowIndex(doc)); - console.log("cells: " + selectedIndexes); - console.log("index: " + this._selectedCol); }; @@ -477,7 +470,6 @@ export class CollectionSchemaView extends CollectionSubView() { this._selectedCells = this._selectedCells.filter(d => d !== doc); if (this._selectedCells){ let selectedIndexes: Array = this._selectedCells.map(doc => this.rowIndex(doc)); - console.log("cells: " + selectedIndexes); } }; @@ -609,7 +601,6 @@ export class CollectionSchemaView extends CollectionSubView() { setColumnValues = (key: string, value: string) => { this.childDocs.forEach(doc => { let docIsSelected = this._selectedCells && !(this._selectedCells?.filter(d => d === doc).length === 0); - console.log(docIsSelected); if (docIsSelected){ KeyValueBox.SetField(doc, key, value) } @@ -620,7 +611,6 @@ export class CollectionSchemaView extends CollectionSubView() { }; setSelectedColumnValues = (key: string, value: string) => { - console.log("called"); this.childDocs.forEach(doc => { let docIsSelected = this._selectedCells && !(this._selectedCells?.filter(d => d === doc).length === 0); if (docIsSelected){ diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index 52c34e8d6..1c4520ae2 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -111,7 +111,6 @@ export class SchemaTableCell extends ObservableReactComponent doc === this._props.Document).length !== 0) && this._props.selectedCol() === this._props.col; - console.log("col: " + this._props.col + " selCol: " + this._props.selectedCol() + " true: " + istrue); return istrue; } @@ -184,8 +183,6 @@ export class SchemaTableCell extends ObservableReactComponent { - console.log(e); - console.log(e.shiftKey); const shift: boolean = e.shiftKey; !this.selected && this._props.selectCell(this._props.Document, this._props.col, shift)} )} diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index 66db06d69..f6e2bfa66 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -141,7 +141,7 @@ export class DashFieldViewInternal extends ObservableReactComponent this._props.tbox._props.PanelWidth() - 20 : returnZero} selectedCells={() => [this._dashDoc!]} - selectedCol={() => 0} //!!! + selectedCol={() => 0} fieldKey={this._fieldKey} rowHeight={returnZero} isRowActive={() => this._expanded && this._props.editable} -- cgit v1.2.3-70-g09d2 From 154029278c92327eb48955ac2c7137b5a59b1d7d Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Thu, 2 May 2024 00:36:11 -0400 Subject: selected cell moves with col; jitter on col move index 0 fixed --- src/client/util/CaptureManager.tsx | 1 + src/client/util/SelectionManager.ts | 2 ++ src/client/util/UndoManager.ts | 18 +++++----- src/client/views/DocumentDecorations.tsx | 1 + src/client/views/MainView.tsx | 1 + .../collections/collectionFreeForm/MarqueeView.tsx | 2 ++ .../collectionSchema/CollectionSchemaView.tsx | 42 +++++++++++++--------- .../collectionSchema/SchemaTableCell.tsx | 7 ++-- src/client/views/nodes/DocumentView.tsx | 3 +- .../views/nodes/formattedText/DashFieldView.tsx | 3 +- 10 files changed, 49 insertions(+), 31 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/util/CaptureManager.tsx b/src/client/util/CaptureManager.tsx index 2e13aff2f..17eba55e7 100644 --- a/src/client/util/CaptureManager.tsx +++ b/src/client/util/CaptureManager.tsx @@ -82,6 +82,7 @@ export class CaptureManager extends React.Component<{}> {
{ + console.log("cancel") //!!! const selected = SelectionManager.Views.slice(); SelectionManager.DeselectAll(); selected.map(dv => dv.props.removeDocument?.(dv.Document)); diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 6f6278662..1a8680e2b 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -44,6 +44,7 @@ export class SelectionManager { }); public static DeselectView = action((docView?: DocumentView): void => { + console.log("single deselect") if (docView && this.Instance.SelectedViews.includes(docView)) { docView.IsSelected = false; this.Instance.SelectedViews.splice(this.Instance.SelectedViews.indexOf(docView), 1); @@ -52,6 +53,7 @@ export class SelectionManager { }); public static DeselectAll = (except?: Doc): void => { + //console.log("deselect all") const found = this.Instance.SelectedViews.find(dv => dv.Document === except); runInAction(() => { LinkManager.Instance.currentLink = undefined; diff --git a/src/client/util/UndoManager.ts b/src/client/util/UndoManager.ts index 421855bf3..20801baa7 100644 --- a/src/client/util/UndoManager.ts +++ b/src/client/util/UndoManager.ts @@ -97,13 +97,13 @@ export namespace UndoManager { export function AddEvent(event: UndoEvent, value?: any): void { if (currentBatch && batchCounter.get() && !undoing) { - console.log( - ' '.slice(0, batchCounter.get()) + - 'UndoEvent : ' + - event.prop + - ' = ' + - (value instanceof RichTextField ? value.Text : value instanceof Array ? value.map(val => Field.toJavascriptString(val)).join(',') : Field.toJavascriptString(value)) - ); + // console.log( + // ' '.slice(0, batchCounter.get()) + + // 'UndoEvent : ' + + // event.prop + + // ' = ' + + // (value instanceof RichTextField ? value.Text : value instanceof Array ? value.map(val => Field.toJavascriptString(val)).join(',') : Field.toJavascriptString(value)) + // ); currentBatch.push(event); tempEvents?.push(event); } @@ -171,7 +171,7 @@ export namespace UndoManager { } export function StartBatch(batchName: string): Batch { - console.log(' '.slice(0, batchCounter.get()) + 'Start ' + batchCounter + ' ' + batchName); + //console.log(' '.slice(0, batchCounter.get()) + 'Start ' + batchCounter + ' ' + batchName); runInAction(() => batchCounter.set(batchCounter.get() + 1)); if (currentBatch === undefined) { currentBatch = []; @@ -181,7 +181,7 @@ export namespace UndoManager { const EndBatch = action((batchName: string, cancel: boolean = false) => { runInAction(() => batchCounter.set(batchCounter.get() - 1)); - console.log(' '.slice(0, batchCounter.get()) + 'End ' + batchName + ' (' + currentBatch?.length + ')'); + //console.log(' '.slice(0, batchCounter.get()) + 'End ' + batchName + ' (' + currentBatch?.length + ')'); if (batchCounter.get() === 0 && currentBatch?.length) { if (!cancel) { undoStack.push(currentBatch); diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 2fb9f0fc1..8f042e68c 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -301,6 +301,7 @@ export class DocumentDecorations extends ObservableReactComponent { SelectionManager.Views.forEach(dv => dv?.iconify()); + console.log("iconify") //!!! SelectionManager.DeselectAll(); }; diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 677114e2d..eb45350a8 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -573,6 +573,7 @@ export class MainView extends ObservableReactComponent<{}> { if (!e.cancelBubble) { const pathstr = (e as any)?.path?.map((p: any) => p.classList?.toString()).join(); if (pathstr?.includes('libraryFlyout')) { + console.log("random") //!!! SelectionManager.DeselectAll(); } } diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx index b913e05ad..62f391201 100644 --- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx +++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx @@ -249,6 +249,7 @@ export class MarqueeView extends ObservableReactComponent { + console.log("pileup")//!!! const selected = this.marqueeSelect(false); SelectionManager.DeselectAll(); selected.forEach(d => this._props.removeDocument?.(d)); diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index a4d7eae06..7067aed5a 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -373,6 +373,9 @@ export class CollectionSchemaView extends CollectionSubView() { @undoBatch moveColumn = (fromIndex: number, toIndex: number) => { + console.log("from: " + fromIndex + " to: " + toIndex) + if (toIndex === this._selectedCol) this._selectedCol = fromIndex; //keeps selected cell consistent + let currKeys = this.columnKeys.slice(); currKeys.splice(toIndex, 0, currKeys.splice(fromIndex, 1)[0]); this.layoutDoc.schema_columnKeys = new List(currKeys); @@ -380,6 +383,8 @@ export class CollectionSchemaView extends CollectionSubView() { let currWidths = this.storedColumnWidths.slice(); currWidths.splice(toIndex, 0, currWidths.splice(fromIndex, 1)[0]); this.layoutDoc.schema_columnWidths = new List(currWidths); + + this._draggedColIndex = toIndex; }; @action @@ -466,23 +471,23 @@ export class CollectionSchemaView extends CollectionSubView() { this._colEles.forEach((colRef, i) => { let edgeStyle = ''; if (i === index) edgeStyle = `solid 2px ${Colors.MEDIUM_BLUE}`; + + //border styles of menu cell colRef.style.borderLeft = edgeStyle; colRef.style.borderRight = edgeStyle; colRef.style.borderTop = edgeStyle; + for (let doc = 0; doc < this.childDocs.length; ++doc){ - this._rowEles.get(this.childDocs[doc]).children[1].children[i].style.borderLeft = edgeStyle; - this._rowEles.get(this.childDocs[doc]).children[1].children[i].style.borderRight = edgeStyle; - if (doc === this.childDocs.length - 1){ - this._rowEles.get(this.childDocs[doc]).children[1].children[i].style.borderBottom = edgeStyle; + if (i === this._selectedCol && this._selectedDocs.includes(this.childDocs[doc])){ + continue; + } else { + this._rowEles.get(this.childDocs[doc]).children[1].children[i].style.borderLeft = edgeStyle; + this._rowEles.get(this.childDocs[doc]).children[1].children[i].style.borderRight = edgeStyle; + if (doc === this.childDocs.length - 1){ + this._rowEles.get(this.childDocs[doc]).children[1].children[i].style.borderBottom = edgeStyle; + } } } - // this.childDocs.forEach(doc => { - // this._rowEles.get(doc).children[1].children[i].style.borderLeft = edgeStyle; - // this._rowEles.get(doc).children[1].children[i].style.borderRight = edgeStyle; - // if (i === this.childDocs.length - 1){ - // this._rowEles.get(doc).children[1].children[i].style.borderBottom = edgeStyle; - // } - // }); }); }; @@ -502,11 +507,11 @@ export class CollectionSchemaView extends CollectionSubView() { addDocToSelection = (doc: Doc, extendSelection: boolean, index: number) => { const rowDocView = DocumentManager.Instance.getDocumentView(doc); if (rowDocView) SelectionManager.SelectView(rowDocView, extendSelection); - else console.log("nonexistent") }; @action clearSelection = () => { + //console.log("clear selection") //!!! SelectionManager.DeselectAll(); this.deselectAllCells(); }; @@ -575,14 +580,17 @@ export class CollectionSchemaView extends CollectionSubView() { e.stopPropagation(); this._colEles.forEach((colRef, i) => { + //style for menu cell colRef.style.borderLeft = ''; colRef.style.borderRight = ''; colRef.style.borderTop = ''; - colRef.style.borderBottom = ''; + this.childDocs.forEach(doc => { - this._rowEles.get(doc).children[1].children[i].style.borderLeft = ''; - this._rowEles.get(doc).children[1].children[i].style.borderRight = ''; - this._rowEles.get(doc).children[1].children[i].style.borderBottom = ''; + if (!(this._selectedDocs.includes(doc) && i === this._selectedCol)){ + this._rowEles.get(doc).children[1].children[i].style.borderLeft = ''; + this._rowEles.get(doc).children[1].children[i].style.borderRight = ''; + this._rowEles.get(doc).children[1].children[i].style.borderBottom = ''; + } }); }); return true; @@ -899,7 +907,7 @@ export class CollectionSchemaView extends CollectionSubView() { ); } get renderKeysMenu() { - console.log('RNDERMENUT:' + this._columnMenuIndex); + //console.log('RNDERMENUT:' + this._columnMenuIndex); return (
e.stopPropagation()} /> diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index 1786d688b..6bbc4dfa6 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -109,9 +109,9 @@ export class SchemaTableCell extends ObservableReactComponent doc === this._props.Document).length !== 0) && this._props.selectedCol() === this._props.col; - return istrue; + const selectedDocs: Doc[] | undefined = this._props.selectedCells(); + let isSelected = this._props.isRowActive() && (selectedDocs?.filter(doc => doc === this._props.Document).length !== 0) && this._props.selectedCol() === this._props.col; + return isSelected; } @computed get defaultCellContent() { @@ -178,6 +178,7 @@ export class SchemaTableCell extends ObservableReactComponent this.onDoubleClickHandler.script.run(scriptProps, console.log).result?.select && this._props.select(false), 'on double click: ' + this.Document.title); } else if (!Doc.IsSystem(this.Document) && defaultDblclick !== 'ignore') { + console.log("double click") //!!! UndoManager.RunInBatch(() => LightboxView.Instance.AddDocTab(this.Document, OpenWhere.lightbox), 'double tap'); SelectionManager.DeselectAll(); Doc.UnBrushDoc(this.Document); @@ -381,7 +382,7 @@ export class DocumentViewInternal extends DocComponent { if (this._props.isGroupActive?.() === 'child' && !this._props.isDocumentActive?.()) return; - this._longPressSelector = setTimeout(() => DocumentView.LongPress && this._props.select(false), 1000); + this._longPressSelector = setTimeout(() => {console.log("long press"); DocumentView.LongPress && this._props.select(false), 1000}); //!!! if (!GestureOverlay.DownDocView) GestureOverlay.DownDocView = this._docView; this._downX = e.clientX; diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index c0c729fb5..a9d916fcd 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -139,7 +139,8 @@ export class DashFieldViewInternal extends ObservableReactComponent (this._expanded = !this._props.editable ? !this._expanded : true))} style={{ fontSize: 'smaller', width: this._props.hideKey ? this._props.tbox._props.PanelWidth() - 20 : undefined }}> +
{console.log(true); + (this._expanded = !this._props.editable ? !this._expanded : true)})} style={{ fontSize: 'smaller', width: this._props.hideKey ? this._props.tbox._props.PanelWidth() - 20 : undefined }}> Date: Fri, 3 May 2024 09:20:46 -0400 Subject: reverting unnecessary changes --- src/client/util/DocumentManager.ts | 5 +---- src/client/util/SelectionManager.ts | 1 - src/client/util/UndoManager.ts | 16 ++++++++-------- .../views/collections/CollectionNoteTakingView.tsx | 1 - src/client/views/nodes/DocumentView.tsx | 19 +++++++++---------- .../views/nodes/formattedText/DashFieldView.tsx | 8 ++++---- 6 files changed, 22 insertions(+), 28 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 561114182..ae5fafcdd 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -36,7 +36,6 @@ export class DocumentManager { } public DeleteDocumentView(dv: DocumentView) { this._documentViews.delete(dv); - console.log("deleted") } //private constructor so no other class can create a nodemanager @@ -95,7 +94,7 @@ export class DocumentManager { this.callAddViewFuncs(view); } // prettier-ignore }; - + public RemoveView = action((view: DocumentView) => { if (!view._props.LayoutTemplateString?.includes(KeyValueBox.name) && !view._props.LayoutTemplateString?.includes(LinkAnchorBox.name)) { this.DeleteDocumentView(view); @@ -127,8 +126,6 @@ export class DocumentManager { public getDocumentView(target: Doc | undefined, preferredCollection?: DocumentView): DocumentView | undefined { const docViewArray = DocumentManager.Instance.DocumentViews; - //console.log(docViewArray) - //console.log(this._documentViews) const passes = !target ? [] : preferredCollection ? [preferredCollection, undefined] : [undefined]; return passes.reduce( (toReturn, pass) => diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index b6ee4d5c3..dd34d5f22 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -9,7 +9,6 @@ import { DocumentView } from '../views/nodes/DocumentView'; import { LinkManager } from './LinkManager'; import { ScriptingGlobals } from './ScriptingGlobals'; import { UndoManager } from './UndoManager'; -import { SchemaRowBox } from '../views/collections/collectionSchema/SchemaRowBox'; export class SelectionManager { private static _manager: SelectionManager; diff --git a/src/client/util/UndoManager.ts b/src/client/util/UndoManager.ts index 20801baa7..b16fed675 100644 --- a/src/client/util/UndoManager.ts +++ b/src/client/util/UndoManager.ts @@ -97,13 +97,13 @@ export namespace UndoManager { export function AddEvent(event: UndoEvent, value?: any): void { if (currentBatch && batchCounter.get() && !undoing) { - // console.log( - // ' '.slice(0, batchCounter.get()) + - // 'UndoEvent : ' + - // event.prop + - // ' = ' + - // (value instanceof RichTextField ? value.Text : value instanceof Array ? value.map(val => Field.toJavascriptString(val)).join(',') : Field.toJavascriptString(value)) - // ); + console.log( + ' '.slice(0, batchCounter.get()) + + 'UndoEvent : ' + + event.prop + + ' = ' + + (value instanceof RichTextField ? value.Text : value instanceof Array ? value.map(val => Field.toJavascriptString(val)).join(',') : Field.toJavascriptString(value)) + ); currentBatch.push(event); tempEvents?.push(event); } @@ -181,7 +181,7 @@ export namespace UndoManager { const EndBatch = action((batchName: string, cancel: boolean = false) => { runInAction(() => batchCounter.set(batchCounter.get() - 1)); - //console.log(' '.slice(0, batchCounter.get()) + 'End ' + batchName + ' (' + currentBatch?.length + ')'); + console.log(' '.slice(0, batchCounter.get()) + 'End ' + batchName + ' (' + currentBatch?.length + ')'); if (batchCounter.get() === 0 && currentBatch?.length) { if (!cancel) { undoStack.push(currentBatch); diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index 8c10db5dc..6318620e0 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -138,7 +138,6 @@ export class CollectionNoteTakingView extends CollectionSubView() { sections.get(existingHeader)!.push(d); } }); - //*!* // now we add back in the docs that we're dragging if (rowCol.length && columnHeaders.length > rowCol[1]) { const offset = 0; diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 5f2a71ef5..ae83819e5 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -279,7 +279,6 @@ export class DocumentViewInternal extends DocComponent dv.ContentDiv); @@ -381,7 +380,7 @@ export class DocumentViewInternal extends DocComponent { if (this._props.isGroupActive?.() === 'child' && !this._props.isDocumentActive?.()) return; - this._longPressSelector = setTimeout(() => (DocumentView.LongPress && this._props.select(false), 1000)); //!!! + this._longPressSelector = setTimeout(() => (DocumentView.LongPress && this._props.select(false), 1000)); if (!GestureOverlay.DownDocView) GestureOverlay.DownDocView = this._docView; this._downX = e.clientX; @@ -1348,14 +1347,14 @@ export class DocumentView extends DocComponent() { select = (extendSelection: boolean, focusSelection?: boolean) => { /*if (this.IsSelected && SelectionManager.Views.length > 1) SelectionManager.DeselectView(this); else {*/ - SelectionManager.SelectView(this, extendSelection); - if (focusSelection) { - DocumentManager.Instance.showDocument(this.Document, { - willZoomCentered: true, - zoomScale: 0.9, - zoomTime: 500, - }); - } + SelectionManager.SelectView(this, extendSelection); + if (focusSelection) { + DocumentManager.Instance.showDocument(this.Document, { + willZoomCentered: true, + zoomScale: 0.9, + zoomTime: 500, + }); + } //} }; DataTransition = () => this._props.DataTransition?.() || StrCast(this.Document.dataTransition); diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index a9d916fcd..6186b3d99 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -135,12 +135,12 @@ export class DashFieldViewInternal extends ObservableReactComponent this._expanded && this._props.editable; finishEdit = action(() => (this._expanded = false)); selectedCell = (): [Doc, number] => [this._dashDoc!, 0]; + selectedCells = () => [this._dashDoc!]; // set the display of the field's value (checkbox for booleans, span of text for strings) @computed get fieldValueContent() { return !this._dashDoc ? null : ( -
{console.log(true); - (this._expanded = !this._props.editable ? !this._expanded : true)})} style={{ fontSize: 'smaller', width: this._props.hideKey ? this._props.tbox._props.PanelWidth() - 20 : undefined }}> +
(this._expanded = !this._props.editable ? !this._expanded : true))} style={{ fontSize: 'smaller', width: this._props.hideKey ? this._props.tbox._props.PanelWidth() - 20 : undefined }}> [this._dashDoc!]} - selectedCol={() => 0} + selectedCells={this.selectedCells} + selectedCol={returnZero} fieldKey={this._fieldKey} rowHeight={returnZero} isRowActive={this.isRowActive} -- cgit v1.2.3-70-g09d2