Closed emroot closed 1 year ago
You should control the Command.Input component by passing value
and onValueChange
.
<Command.Input
value={search}
onValueChange={setSearch}
onKeyDown={e => {
if (e.key === 'Enter' && search) {
setSearch('');
// do whatever else you wanted
}
}
/>
hey I'm running into an issue where the search state value doesn't get cleared when I'm doing the following:
It would be great to expose useStore so I can import and do
PR for the change here: https://github.com/pacocoursey/cmdk/pull/105