From 69c051757ebef240d150f1ecceff3a4aaefd4d98 Mon Sep 17 00:00:00 2001 From: brandon-schabel Date: Thu, 16 Jan 2025 23:22:13 -0700 Subject: [PATCH] more keyboard nav --- packages/client/src/components/projects/file-panel.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/client/src/components/projects/file-panel.tsx b/packages/client/src/components/projects/file-panel.tsx index 17634bc..8d9088a 100644 --- a/packages/client/src/components/projects/file-panel.tsx +++ b/packages/client/src/components/projects/file-panel.tsx @@ -285,6 +285,10 @@ export const FilePanel = forwardRef(({ 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) + } } } }}