File tree 1 file changed +2
-2
lines changed
site/src/components/UserOrGroupAutocomplete 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ import Autocomplete from "@mui/material/Autocomplete";
5
5
import { useMachine } from "@xstate/react" ;
6
6
import { Group , User } from "api/typesGenerated" ;
7
7
import { AvatarData } from "components/AvatarData/AvatarData" ;
8
- import debounce from "just-debounce-it" ;
9
8
import { ChangeEvent , useState } from "react" ;
10
9
import { getGroupSubtitle } from "utils/groups" ;
11
10
import { searchUsersAndGroupsMachine } from "xServices/template/searchUsersAndGroupsXService" ;
12
11
import Box from "@mui/material/Box" ;
12
+ import { useDebouncedFunction } from "hooks/debounce" ;
13
13
14
14
export type UserOrGroupAutocompleteValue = User | Group | null ;
15
15
@@ -44,7 +44,7 @@ export const UserOrGroupAutocomplete: React.FC<
44
44
return ! excludeIds . includes ( result . id ) ;
45
45
} ) ;
46
46
47
- const handleFilterChange = debounce (
47
+ const { debounced : handleFilterChange } = useDebouncedFunction (
48
48
( event : ChangeEvent < HTMLInputElement > ) => {
49
49
sendSearch ( "SEARCH" , { query : event . target . value } ) ;
50
50
} ,
You can’t perform that action at this time.
0 commit comments