diff options
| author | Fawn <fangrui_tong@brown.edu> | 2019-07-29 11:27:58 -0400 |
|---|---|---|
| committer | Fawn <fangrui_tong@brown.edu> | 2019-07-29 11:27:58 -0400 |
| commit | 7ea25f83dfcb3fb31bf6fce1f4112c8bded294e2 (patch) | |
| tree | 1d3cfa0d5f8e3424423c1ed5fdfc06c027c2df48 /src/client/views/collections/CollectionSchemaCells.tsx | |
| parent | 7098f381f3f93e77880f3589427c81e61a5ee25a (diff) | |
| parent | e7ea2028f54787d6c92fb22b789f17b7268d3793 (diff) | |
fixed sub collections having wrong children
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaCells.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index f1e013edd..194765880 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -25,6 +25,7 @@ import { library } from '@fortawesome/fontawesome-svg-core'; import { faExpand } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { SchemaHeaderField } from "../../../new_fields/SchemaHeaderField"; +import { KeyCodes } from "../../northstar/utils/KeyCodes"; library.add(faExpand); @@ -66,7 +67,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> { @action onKeyDown = (e: KeyboardEvent): void => { - if (this.props.isFocused && this.props.isEditable) { + if (this.props.isFocused && this.props.isEditable && e.keyCode === KeyCodes.ENTER) { document.removeEventListener("keydown", this.onKeyDown); this._isEditing = true; this.props.setIsEditing(true); |
