Prevent form submit onEnter

pull/2098/head
Andrew Watkins 2017-10-16 17:31:45 -07:00
parent f237fa083e
commit 54c146ae15
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import Dropdown from 'shared/components/Dropdown'
const mapToItems = (arr, type) => arr.map(text => ({text, type}))
const operators = mapToItems(OPERATORS, 'operator')
const noopSubmit = e => e.preventDefault()
const Threshold = ({
rule: {values: {operator, value, rangeValue}},
@ -24,7 +25,7 @@ const Threshold = ({
selected={operator}
onChoose={onDropdownChange}
/>
<form style={{display: 'flex'}}>
<form style={{display: 'flex'}} onSubmit={noopSubmit}>
<input
className="form-control input-sm form-malachite monotype"
style={{width: '160px', marginLeft: '6px'}}