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
  • Loading branch information
YulNaumenko committed Apr 15, 2020
1 parent f90fe7e commit ba44fdb
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 ba44fdb

Please sign in to comment.