[APM] Bug with Transaction Latency Threshold rule (#111541)

This commit is contained in:
Cauê Marcondes 2021-09-08 15:23:52 -04:00 committed by GitHub
parent 3e1e90fd47
commit 958adc57af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,10 +42,13 @@ export function EnvironmentField({
const title = i18n.translate('xpack.apm.alerting.fields.environment', {
defaultMessage: 'Environment',
});
// "1" means "All" is the only option and we should not show a select.
if (options.length === 1) {
return <EuiExpression description={title} value={ENVIRONMENT_ALL.text} />;
return (
<EuiExpression
description={title}
value={currentValue || ENVIRONMENT_ALL.text}
/>
);
}
return (