Skip to content

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Dec 17, 2024
1 parent 9107f1b commit c250dc4
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,8 @@ export const TransformSelectorControl: FC<TransformSelectorControlProps> = ({
}) as Exclude<EuiComboBoxProps<string>['onChange'], undefined>;

const onCreateOption = allowCustomOptions
? (((searchValue, existingOptions) => {
if (
searchValue.includes('*') &&
!existingOptions.some((option) => option.label === searchValue)
) {
onChange([...selectedOptions, searchValue]);
}
? (((searchValue) => {
onChange([...selectedOptions, searchValue]);
}) as EuiComboBoxOptionsListProps<string>['onCreateOption'])
: undefined;

Expand Down

0 comments on commit c250dc4

Please sign in to comment.