Skip to content

Commit

Permalink
Fix subtype parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaStoeva committed Jun 2, 2023
1 parent b8eed60 commit 91504ee
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down

0 comments on commit 91504ee

Please sign in to comment.