Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(kommand): don't auto-focus search row at top (#3041)

gbirmanef61a8b6e49d
diff --git a/js/app/packages/app/component/command/CommandMenu.tsx b/js/app/packages/app/component/command/CommandMenu.tsx
index c8b52b9a51..1aa6f68a59 100644
--- a/js/app/packages/app/component/command/CommandMenu.tsx
+++ b/js/app/packages/app/component/command/CommandMenu.tsx
@@ -138,7 +138,9 @@ export function CommandMenuInner(props: {
createEffect(
on(query, () => {
- CommandState.setSelectedIndex(0);
+ const items = filteredItems();
+ const firstIsSearch = items[0] && isSearchItem(items[0]);
+ CommandState.setSelectedIndex(firstIsSearch && items.length > 1 ? 1 : 0);
})
);