Skip to content

Commit

Permalink
Fixed inability to clear numeric field in a "Group over top docs" con…
Browse files Browse the repository at this point in the history
…dition (#63543) (#63589)
  • Loading branch information
YulNaumenko authored Apr 15, 2020
1 parent 186e033 commit ee078a5
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,13 @@ export const GroupByExpression = ({
{groupByTypes[groupBy].sizeRequired ? (
<Fragment>
<EuiFlexItem grow={false}>
<EuiFormRow
isInvalid={errors.termSize.length > 0 && termSize !== undefined}
error={errors.termSize}
>
<EuiFormRow isInvalid={errors.termSize.length > 0} error={errors.termSize}>
<EuiFieldNumber
isInvalid={errors.termSize.length > 0 && termSize !== undefined}
value={termSize}
isInvalid={errors.termSize.length > 0}
value={termSize || ''}
onChange={e => {
const { value } = e.target;
const termSizeVal = value !== '' ? parseFloat(value) : MIN_TERM_SIZE;
const termSizeVal = value !== '' ? parseFloat(value) : undefined;
onChangeSelectedTermSize(termSizeVal);
}}
min={MIN_TERM_SIZE}
Expand Down

0 comments on commit ee078a5

Please sign in to comment.