Skip to content

Commit

Permalink
Fix validation for index threshold when selecting an index
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Mar 27, 2020
1 parent 0145121 commit 90061fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,12 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent<IndexThr
defaultMessage: 'index',
}
)}
value={index ? index.join(' ') : firstFieldOption.text}
value={index && index.length > 0 ? index.join(' ') : firstFieldOption.text}
isActive={indexPopoverOpen}
onClick={() => {
setIndexPopoverOpen(true);
}}
color={index ? 'secondary' : 'danger'}
color={index && index.length > 0 ? 'secondary' : 'danger'}
/>
}
isOpen={indexPopoverOpen}
Expand Down

0 comments on commit 90061fb

Please sign in to comment.