aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/SchemaTable.tsx
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 /src/client/views/collections/SchemaTable.tsx
parent9be87ed8678a2554288ef6fd99660f55d3bd172b (diff)
fixed backspacing to delete schemaviews
Diffstat (limited to 'src/client/views/collections/SchemaTable.tsx')
-rw-r--r--src/client/views/collections/SchemaTable.tsx8
1 files changed, 5 insertions, 3 deletions
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