fix: remove unused keyRepeatTimeoutRef
This commit is contained in:
parent
639bd5fb27
commit
6c0e6dce06
@ -137,7 +137,6 @@ function useKeyboardNavigation(
|
||||
onModelSelect: (model: string) => void,
|
||||
dropdownRef: React.RefObject<HTMLDivElement | null>
|
||||
) {
|
||||
const keyRepeatTimeoutRef = useRef<NodeJS.Timeout | null>(null)
|
||||
|
||||
// Scroll to the highlighted element
|
||||
useEffect(() => {
|
||||
@ -204,16 +203,6 @@ function useKeyboardNavigation(
|
||||
}
|
||||
}, [open, setOpen, models.length, filteredModels, highlightedIndex, setHighlightedIndex, onModelSelect])
|
||||
|
||||
// Cleanup the timeout
|
||||
useEffect(() => {
|
||||
const timeoutId = keyRepeatTimeoutRef.current
|
||||
return () => {
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId)
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
return { handleKeyDown }
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user