Skip to content

Commit 471acf8

Browse files
committed
TSJR-314 fix linting issues
1 parent cbd8e8c commit 471acf8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/apps/admin/src/skills-manager/components/bulk-editor/search-skill-input/SearchSkillInput.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { ChangeEvent, FC, useMemo } from 'react'
22
import { escapeRegExp } from 'lodash'
3-
import { FilterOptionOption } from 'react-select/dist/declarations/src/filters'
43

5-
import { InputSelectReact } from '~/libs/ui'
4+
import { InputSelectOption, InputSelectReact } from '~/libs/ui'
65

76
import { mapSkillToSelectOption } from '../../../lib'
87
import { StandardizedSkill } from '../../../services'
@@ -21,9 +20,9 @@ const SearchSkillInput: FC<SearchSkillInputProps> = props => {
2120
mapSkillToSelectOption(props.skills)
2221
), [props.skills])
2322

24-
function filterOptions(o: FilterOptionOption<any>, v: string): boolean {
23+
function filterOptions(o: InputSelectOption, v: string): boolean {
2524
const normValue = normalize(v)
26-
const normLabel = normalize(o.label)
25+
const normLabel = normalize(o.label as string)
2726

2827
if (v.length < 3 && normValue !== normLabel) {
2928
return false

src/libs/ui/lib/components/form/form-groups/form-input/input-select-react/InputSelectReact.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
useRef,
99
} from 'react'
1010
import { find } from 'lodash'
11-
import { FilterOptionOption } from 'react-select/dist/declarations/src/filters'
1211
import CreatableSelect from 'react-select/creatable'
1312
import ReactSelect, { GroupBase, OptionsOrGroups } from 'react-select'
1413
import classNames from 'classnames'
@@ -42,7 +41,7 @@ interface InputSelectReactProps {
4241
readonly onBlur?: (event: FocusEvent<HTMLInputElement>) => void
4342
readonly openMenuOnClick?: boolean
4443
readonly openMenuOnFocus?: boolean
45-
readonly filterOption?: <T>(option: FilterOptionOption<T>, value: string) => boolean
44+
readonly filterOption?: (option: InputSelectOption, value: string) => boolean
4645
}
4746

4847
/**

0 commit comments

Comments
 (0)