+
{
+ setQuery(e.target.value);
+ setActive(0);
+ }}
+ onKeyDownCapture={onKeyDownCapture}
+ onKeyDown={onKeyDown}
+ />
+
+ {items.map((it, i) => (
+ - setActive(i)}
+ onClick={() => choose(i)}
+ >
+ {it.group}
+ {it.title}
+ {it.subtitle && {it.subtitle}}
+ {it.shortcut && {it.shortcut}}
+
+ ))}
+ {items.length === 0 && - No matches
}
+
+
+ {highlighted?.shortcut ? `Did you know? ${highlighted.title} is ${highlighted.shortcut}` : 'Up/Down to move, Enter to run, Esc to close'}
+
+
+