aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-08 10:17:03 -0400
committerbobzel <zzzman@gmail.com>2020-10-08 10:17:03 -0400
commitf6623a790fbb5df02effebbe9edea69383e0569f (patch)
treeee8cff23a59d3713a5ea2a667906130c13258955
parent9be87ed8678a2554288ef6fd99660f55d3bd172b (diff)
fixed backspacing to delete schemaviews
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx2
-rw-r--r--src/client/views/collections/SchemaTable.tsx8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 889cc7b0d..9f8468253 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -530,7 +530,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
this.columns = columns;
}
- onZoomMenu = (e: React.WheelEvent) => { this.props.active(true) && e.stopPropagation(); }
+ onZoomMenu = (e: React.WheelEvent) => this.props.active(true) && e.stopPropagation();
render() {
TraceMobx();
diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx
index 12827ff66..087d106c5 100644
--- a/src/client/views/collections/SchemaTable.tsx
+++ b/src/client/views/collections/SchemaTable.tsx
@@ -344,9 +344,11 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
const direction = e.key === "Tab" ? "tab" : e.which === 39 ? "right" : e.which === 37 ? "left" : e.which === 38 ? "up" : e.which === 40 ? "down" : "";
this._focusedCell = this.changeFocusedCellByDirection(direction, this._focusedCell.row, this._focusedCell.col);
- const pdoc = FieldValue(this.childDocs[this._focusedCell.row]);
- pdoc && this.props.setPreviewDoc(pdoc);
- e.stopPropagation();
+ if (direction) {
+ const pdoc = FieldValue(this.childDocs[this._focusedCell.row]);
+ pdoc && this.props.setPreviewDoc(pdoc);
+ e.stopPropagation();
+ }
} else if (e.keyCode === 27) {
this.props.setPreviewDoc(undefined);
e.stopPropagation(); // stopPropagation for left/right arrows