Skip to content

Commit

Permalink
more keyboard nav
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-schabel committed Jan 17, 2025
1 parent b54a7ce commit 69c0517
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/client/src/components/projects/file-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ export const FilePanel = forwardRef<FilePanelRef, FilePanelProps>(({
e.preventDefault()
if (autocompleteIndex >= 0 && autocompleteIndex < suggestions.length) {
selectFileFromAutocomplete(suggestions[autocompleteIndex])
// Move cursor down if there are more items
if (autocompleteIndex < suggestions.length - 1) {
setAutocompleteIndex(prev => prev + 1)
}
}
}
}}
Expand Down

0 comments on commit 69c0517

Please sign in to comment.