|
|
|
@ -168,18 +168,18 @@ const SearchBar = forwardRef< |
|
|
|
}, [input, debouncedInput, profiles]) |
|
|
|
}, [input, debouncedInput, profiles]) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
if (list) { |
|
|
|
setDisplayList(searching && !!input) |
|
|
|
|
|
|
|
}, [searching, input]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (displayList && list) { |
|
|
|
modalManager.register(id, () => { |
|
|
|
modalManager.register(id, () => { |
|
|
|
setDisplayList(false) |
|
|
|
setDisplayList(false) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
modalManager.unregister(id) |
|
|
|
modalManager.unregister(id) |
|
|
|
} |
|
|
|
} |
|
|
|
}, [list]) |
|
|
|
}, [displayList, list]) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
setDisplayList(searching && !!input) |
|
|
|
|
|
|
|
}, [searching, input]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleKeyDown = useCallback( |
|
|
|
const handleKeyDown = useCallback( |
|
|
|
(e: React.KeyboardEvent) => { |
|
|
|
(e: React.KeyboardEvent) => { |
|
|
|
|