diff options
| author | bobzel <zzzman@gmail.com> | 2025-05-14 22:40:13 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-05-14 22:40:13 -0400 |
| commit | 6bd031a36680f9416938196981ad71f674afca26 (patch) | |
| tree | 7623e5aa3528094b56934ec7d4f70b11224ef327 /src/client/views/collections/collectionSchema | |
| parent | 80b07ab9b3e8f1e1bd0f5898177628047254bf25 (diff) | |
| parent | cc3838dd456da90a66d7b563d9f4ea7b8753c4de (diff) | |
Merge branch 'master' into aarav_edit
Diffstat (limited to 'src/client/views/collections/collectionSchema')
| -rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index c06391f35..6442385c0 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -359,7 +359,7 @@ export class CollectionSchemaView extends CollectionSubView() { @action addNewKey = (key: string, defaultVal: FieldType | undefined) => { this.childDocs.forEach(doc => { - doc[DocData][key] = defaultVal; + if (doc[DocData][key] === undefined) doc[DocData][key] = defaultVal; }); }; diff --git a/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx b/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx index 16d33eb93..134f2ed31 100644 --- a/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx +++ b/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx @@ -115,12 +115,11 @@ export class SchemaColumnHeader extends ObservableReactComponent<SchemaColumnHea }; const readOnly = this.getFinfo(fieldKey)?.readOnly ?? false; const cursor = !readOnly ? 'text' : 'default'; - const pointerEvents: 'all' | 'none' = 'all'; - return { color, fieldProps, cursor, pointerEvents }; + return { color, fieldProps, cursor }; }; @computed get editableView() { - const { color, fieldProps, pointerEvents } = this.renderProps(this._props); + const { color, fieldProps } = this.renderProps(this._props); return ( <div @@ -132,7 +131,6 @@ export class SchemaColumnHeader extends ObservableReactComponent<SchemaColumnHea style={{ color, width: '100%', - pointerEvents, }}> <EditableView ref={r => { @@ -232,6 +230,7 @@ export class SchemaColumnHeader extends ObservableReactComponent<SchemaColumnHea className="schema-column-header" style={{ width: this._props.columnWidths[this._props.columnIndex], + pointerEvents: this.props.isContentActive() ? undefined : 'none', }} onPointerEnter={() => { this.handlePointerEnter(); |
