diff --git a/superset-frontend/src/components/Select/Select.tsx b/superset-frontend/src/components/Select/Select.tsx index 9a308447c4f31..f4af2d3711801 100644 --- a/superset-frontend/src/components/Select/Select.tsx +++ b/superset-frontend/src/components/Select/Select.tsx @@ -42,7 +42,7 @@ import Icons from 'src/components/Icons'; import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import { SLOW_DEBOUNCE } from 'src/constants'; import { rankedSearchCompare } from 'src/utils/rankedSearchCompare'; -import { getValue, hasOption, hasOptionIgnoreCase } from './utils'; +import { getValue, hasOption } from './utils'; const { Option } = AntdSelect; diff --git a/superset-frontend/src/components/Select/utils.ts b/superset-frontend/src/components/Select/utils.ts index 4216b70597208..c6299db34e278 100644 --- a/superset-frontend/src/components/Select/utils.ts +++ b/superset-frontend/src/components/Select/utils.ts @@ -24,8 +24,6 @@ import { GroupedOptionsType, } from 'react-select'; -import { OptionsType as AntdOptionsType } from './Select'; - /** * Find Option value that matches a possibly string value. * @@ -76,16 +74,3 @@ export function hasOption( ) !== undefined ); } - -export function hasOptionIgnoreCase(search: string, options: AntdOptionsType) { - const searchOption = search.trim().toLowerCase(); - return options.find(opt => { - const { label, value } = opt; - const labelText = String(label); - const valueText = String(value); - return ( - valueText.toLowerCase() === searchOption || - labelText.toLowerCase() === searchOption - ); - }); -}