[AppServices] @timestamp as default for timestamp field name in index pattern (#25863) (#116126)

This commit is contained in:
Shivindera Singh 2021-11-01 16:08:08 +01:00 committed by GitHub
parent fa79ebeabd
commit f6f7c2d1de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,6 +105,13 @@ export const TimestampField = ({
const { isInvalid, errorMessage } = getFieldValidityAndErrorMessage(field);
const isDisabled = !optionsAsComboBoxOptions.length;
if (!value && !isDisabled) {
const val = optionsAsComboBoxOptions.filter((el) => el.value === '@timestamp');
if (val.length) {
setValue(val[0]);
}
}
return (
<>
<EuiFormRow