diff options
| author | bobzel <zzzman@gmail.com> | 2024-03-30 02:18:07 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-03-30 02:18:07 -0400 |
| commit | a9baa52c557faaa82fd3f696f0d603dd10b982a8 (patch) | |
| tree | 6581ff35fa27150df1d18845eee37346613a1aca /src/client/views/collections/collectionSchema | |
| parent | ad1b41beaa0c55487d41381bddd80ab1a76e7fb5 (diff) | |
updated mermaids template. updated paintFunc to also render the underlying code text so that the paintFunc will update if dashFields in the code change. fixed schema views to render templates properly in preview. fixed text to only modify the data doc. changed setPixels in imageBox to not consider scaling of outer containers.
Diffstat (limited to 'src/client/views/collections/collectionSchema')
| -rw-r--r-- | src/client/views/collections/collectionSchema/SchemaTableCell.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index ab05a62d3..bf36b2668 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -98,7 +98,7 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro focus: emptyFunction, addDocTab: SchemaTableCell.addFieldDoc, pinToPres: returnZero, - Document, + Document: DocCast(Document.rootDocument, Document), fieldKey: fieldKey, PanelWidth: columnWidth, PanelHeight: props.rowHeight, @@ -134,14 +134,14 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro contents={undefined} fieldContents={fieldProps} editing={this.selected ? undefined : false} - GetValue={() => Field.toKeyValueString(this._props.Document, this._props.fieldKey, SnappingManager.MetaKey)} + GetValue={() => Field.toKeyValueString(fieldProps.Document, this._props.fieldKey, SnappingManager.MetaKey)} SetValue={undoable((value: string, shiftDown?: boolean, enterKey?: boolean) => { if (shiftDown && enterKey) { this._props.setColumnValues(this._props.fieldKey.replace(/^_/, ''), value); this._props.finishEdit?.(); return true; } - const ret = KeyValueBox.SetField(this._props.Document, this._props.fieldKey.replace(/^_/, ''), value, Doc.IsDataProto(this._props.Document) ? true : undefined); + const ret = KeyValueBox.SetField(fieldProps.Document, this._props.fieldKey.replace(/^_/, ''), value, Doc.IsDataProto(fieldProps.Document) ? true : undefined); this._props.finishEdit?.(); return ret; }, 'edit schema cell')} |
