diff options
3 files changed, 7 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 6838662c7..308520154 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -587,7 +587,7 @@ export class CollectionSchemaView extends CollectionSubView() { const color = randomRGBColor(); const doc = info[0]; const field = info[1]; - const key = `${doc}_${field}`; + const key = `${doc[Id]}_${field}`; const cell = this.getCellElement(doc, field); if (!this._cellHighlightColors.has(key)) {this._cellHighlightColors.set(key, new Array<string>(`solid 2px ${color[0]}`, color[1]))} cell.style.border = this._cellHighlightColors.get(key)[0]; diff --git a/src/client/views/collections/collectionSchema/SchemaCellField.tsx b/src/client/views/collections/collectionSchema/SchemaCellField.tsx index 6663fb68f..dcfa4f6f2 100644 --- a/src/client/views/collections/collectionSchema/SchemaCellField.tsx +++ b/src/client/views/collections/collectionSchema/SchemaCellField.tsx @@ -39,8 +39,10 @@ export class SchemaCellField extends ObservableReactComponent<SchemaCellFieldPro get docIndex(){return DocumentView.getDocViewIndex(this._props.Document);} // prettier-ignore componentDidMount(): void { - this._content = this.props.GetValue() ?? ''; - this.setContent(this._content); + setTimeout(() => { + this._content = this._props.GetValue() ?? ''; + this.setContent(this._content); + }, 0); //must be moved to end of batch or else other docs aren't loaded, so render as d-1 in function this._disposers.editing = reaction( () => this._editing, editing => { @@ -50,6 +52,7 @@ export class SchemaCellField extends ObservableReactComponent<SchemaCellFieldPro this._overlayDisposer?.(); this._overlayDisposer = OverlayView.Instance.addElement(<DocumentIconContainer />, { x: 0, y: 0 }); this._props.highlightCells?.(this._props.GetValue() ?? ''); + if (this._props.Document.type === 'collection') console.log('highlight: ' + this._props.GetValue()) this.setContent(this._content); } }); diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index 3233e363a..94fd9ec7d 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -152,6 +152,7 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro // parses a field from the "idToDoc(####)" format to DocumentId (d#) format for readability cleanupField = (field: string) => { + if (field === ':=d6.type + d4.type + d3.type') console.log(true) const idPattern = /idToDoc\((.*?)\)/g; let modField = field.slice(); let matches; |