aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaCells.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-03-06 17:29:27 -0500
committerbob <bcz@cs.brown.edu>2020-03-06 17:29:27 -0500
commit4863b1ef9ec3160b0888a5ab8bb1a62274aed5ec (patch)
treebefbb6450378275a7a6227c572d70d8823ee9e98 /src/client/views/collections/CollectionSchemaCells.tsx
parent6a2b210f32cb70646a5d9097e667c0d199057901 (diff)
made tree views display documentViews instead of just strings
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index df7abad61..79b5d7bb7 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -77,7 +77,8 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
@action
isEditingCallback = (isEditing: boolean): void => {
- document.addEventListener("keydown", this.onKeyDown);
+ document.removeEventListener("keydown", this.onKeyDown);
+ isEditing && document.addEventListener("keydown", this.onKeyDown);
this._isEditing = isEditing;
this.props.setIsEditing(isEditing);
this.props.changeFocusedCellByIndex(this.props.row, this.props.col);