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