adds numeric.js to constants

This commit is contained in:
zmagod 2017-08-09 16:01:03 +02:00
parent 790ae9d685
commit b90348eabf
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1 @@
export const ENTER_KEY_CODE = 13;

View file

@ -8,6 +8,7 @@ import {
} from "react-bootstrap";
import styled from "styled-components";
import { SEARCH_PATH } from "../../../app/routes";
import { ENTER_KEY_CODE } from "../../../app/constants/numeric";
const StyledFormGroup = styled(FormGroup)`
margin-bottom: 0px;
@ -41,7 +42,7 @@ class SearchDropdown extends Component {
}
handleKeyPress(ev) {
if (ev.charCode === 13) {
if (ev.charCode === ENTER_KEY_CODE) {
this.submitSearch();
}
}