From 730d568fb4cb37c5d673517179e8e5dc532ad9c8 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 26 Mar 2025 23:19:28 -0400 Subject: fixed keyValue box assignments so that '_' assigns to template unless value starts with '=' (then root doc). fixed deleting template keys in keyValuePair. fixed schemaTableCell to show current editable value (not last edited value) when editing layout and data doc values. updated DocumentOptions API. --- .../collections/collectionMulticolumn/CollectionMulticolumnView.tsx | 3 --- src/client/views/collections/collectionSchema/SchemaCellField.tsx | 6 +++--- src/client/views/collections/collectionSchema/SchemaTableCell.tsx | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/client/views/collections') diff --git a/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx b/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx index 58582a142..f27398427 100644 --- a/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx +++ b/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx @@ -202,7 +202,6 @@ export class CollectionMulticolumnView extends CollectionSubView() { return Transform.Identity(); // we're still waiting on promises to resolve } let offset = 0; - // eslint-disable-next-line no-restricted-syntax for (const { layout: candidate } of this.childLayoutPairs) { if (candidate === layout) { return this.ScreenToLocalBoxXf().translate(-offset / (this._props.NativeDimScaling?.() || 1), 0); @@ -316,7 +315,6 @@ export class CollectionMulticolumnView extends CollectionSubView() { const collector: JSX.Element[] = []; this.childLayouts.forEach((layout, i) => { collector.push( - // eslint-disable-next-line react/no-array-index-key
{this.getDisplayDoc(layout)} @@ -328,7 +326,6 @@ export class CollectionMulticolumnView extends CollectionSubView() { , this._props.GetValue(), - fieldVal => { + () => ({ fieldVal: this._props.GetValue(), editing: 0 }), // this._editing }), + ({ fieldVal, editing }) => { this._unrenderedContent = fieldVal ?? ''; - this.finalizeEdit(false, false, false); + !this._editing && this.finalizeEdit(false, false, false); } ); } diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index e6fe46638..aeceedc30 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -211,8 +211,7 @@ export class SchemaTableCell extends ObservableReactComponent