fix: add missing popoverFilter to handleKeyDown useCallback deps

Fixes stale closure bug where keyboard navigation in the slash command
popover could reference an outdated filteredItems list when the filter
text changed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
7418andClaude Opus 4.6 committed 2026-02-08 20:29:04 +08:00
1 parent 8b8a427754
commit e2ef642b67
1 file changed
+1 -1
+1 -1
View File
@@ -469,7 +469,7 @@ export function MessageInput({
return;
}
},
[popoverMode, popoverItems, selectedIndex, insertItem, closePopover, badge, inputValue, removeBadge]
[popoverMode, popoverItems, popoverFilter, selectedIndex, insertItem, closePopover, badge, inputValue, removeBadge]
);
// Click outside to close popover