You should be able to pass a value
prop to Command.Item
and use children
to display the label.
Hi.
Have you tried rendering a Command.Item
where the value
is the current input value?
<Command>
<Command.Input value={inputValue} onChange={e => setInputValue(e.target.value)} />
<Command.List>
<Command.Item value={inputValue} onSelect={createNew}>
Create new {inputValue}
</Command.Item>
</Command.List>
</Command>
This way it should always match the input query and even show up when no other results are matching.
I am trying to add cmdk
for the react-based chrome extension.
But Command.Dialog
appears at the end of the page without any styling.
For example, how it looks on github.com:
Do you have any idea what went wrong?
The component is unstyled out of the box for customization. You can copy and paste styles as a starting point from here.
Hi hi! Checking in to see if there's any movement or further consideration for this? Really missing this every day!