Passing a defaultValue into an uncontrolled <Command.Input /> causes a console warning and the value does not appear in the input.
warning in console:
Warning: Primitive.input contains an input of type text with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props.
Passing a
defaultValue
into an uncontrolled<Command.Input />
causes a console warning and the value does not appear in the input.warning in console:
Reproduced demo: https://codesandbox.io/p/sandbox/cmdk-default-value-bug-qpkpwv