aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema
diff options
context:
space:
mode:
authorJoanne <zehan_ding@brown.edu>2025-05-12 21:00:38 -0400
committerJoanne <zehan_ding@brown.edu>2025-05-12 21:00:38 -0400
commit430db63077868fa54829721d6530a810aa4d4588 (patch)
tree4b1ac30d8f5d90ba4b9d5e45414e6222d3af0e09 /src/client/views/collections/collectionSchema
parentcd93c88b8fee83a99342eac4dc60f7b4373fa843 (diff)
parent0c3f86d57225a2991920adef3a337bc13e408ac0 (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into joanne-tutorialagent
Diffstat (limited to 'src/client/views/collections/collectionSchema')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx2
-rw-r--r--src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx7
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();