diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/subtype_parameter.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/subtype_parameter.tsx index 404deb6356d82..21c195e1180aa 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/subtype_parameter.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/subtype_parameter.tsx @@ -85,7 +85,13 @@ export const SubTypeParameter = ({ : filterTypesForNonRootFields(subTypeOptions!) } selectedOptions={subTypeField.value as ComboBoxOption[]} - onChange={subTypeField.setValue} + onChange={(value) => { + if (value.length === 0) { + // Don't allow clearing the type. One must always be selected + return; + } + subTypeField.setValue(value); + }} isClearable={false} data-test-subj="fieldSubType" />