File tree 1 file changed +7
-7
lines changed
site/src/components/UserAutocomplete 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -38,20 +38,20 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = ({
38
38
const [ searchState , sendSearch ] = useMachine ( searchUserMachine ) ;
39
39
const { searchResults } = searchState . context ;
40
40
41
- // seed list of options on the first page load if a user passes in a value
42
- // since some organizations have long lists of users, we do not load all
43
- // options on page load.
41
+ // Seed list of options on the first page load if a user passes in a value.
42
+ // Since some organizations have long lists of users, we do not want to load
43
+ // all options on page load.
44
44
const onMountRef = useRef ( value ) ;
45
45
useEffect ( ( ) => {
46
46
const mountValue = onMountRef . current ;
47
47
if ( mountValue ) {
48
48
sendSearch ( "SEARCH" , { query : mountValue . email } ) ;
49
49
}
50
50
51
- // 2023-09-15 - This isn't in XState's docs, but its source code guarantees
52
- // that the memory reference of sendSearch will stay stable across renders.
53
- // This useEffect call will behave like an on-mount effect and will not ever
54
- // need to resynchronize
51
+ // This isn't in XState's docs, but its source code guarantees that the
52
+ // memory reference of sendSearch will stay stable across renders. This
53
+ // useEffect call will behave like an on-mount effect and will not ever need
54
+ // to resynchronize
55
55
} , [ sendSearch ] ) ;
56
56
57
57
const { debounced : debouncedOnChange } = useDebouncedFunction (
You can’t perform that action at this time.
0 commit comments