fix failing test

This commit is contained in:
Sudhanshu Gautam 2021-03-21 18:56:05 +05:30
parent 7cdb5206af
commit 3fa4a871fc
5 changed files with 14 additions and 10 deletions

View file

@ -73,13 +73,11 @@ const ProfileSearch: FunctionComponent<Props> = ({ selectedVersion, onProfileCha
options: SearchData[],
state: FilterOptionsState<SearchData>
) => SearchData[] = (options, { inputValue }) =>
throttle(
() =>
matchSorter(options, inputValue.replaceAll(' ', ''), {
keys: ['search'],
}).slice(0, 10),
1000
)() || [];
throttle(() => {
return matchSorter(options, inputValue.replaceAll?.(' ', '') || inputValue, {
keys: ['search'],
}).slice(0, 10);
}, 1000)() || [];
if (working) return <CircularProgress />;