aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 332a2001f..520d4c8c5 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -484,8 +484,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
documentKeys={this.documentKeys}
headerIsEditing={this._headerIsEditing}
openHeader={this.openHeader}
- onClick={e => { e.stopPropagation(); this.closeHeader(); }}
- onPointerDown={this.onTablePointerDown}
+ onClick={this.onTableClick}
+ onPointerDown={emptyFunction}
onResizedChange={this.onResizedChange}
setColumns={this.setColumns}
reorderColumns={this.reorderColumns}
@@ -520,15 +520,14 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
}
@action
- onTablePointerDown = (e: React.PointerEvent): void => {
+ onTableClick = (e: React.MouseEvent): void => {
if (!(e.target as any)?.className?.includes?.("collectionSchemaView-cell") && !(e.target instanceof HTMLSpanElement)) {
this.setPreviewDoc(undefined);
- }
- this.setFocused(this.props.Document);
- if (e.button === 0 && !e.altKey && !e.ctrlKey && !e.metaKey && this.props.isSelected(true)) {
+ } else {
e.stopPropagation();
}
- // this.closeHeader();
+ this.setFocused(this.props.Document);
+ this.closeHeader();
}
onResizedChange = (newResized: Resize[], event: any) => {