cmdk
1.1.1 · 14 Mar 2025MIT51M / weekRepositoryHomepagenpmAtom feed
1.1.1 is the newest release of 1.x.
In short
1 breaking5 new7 fixed1 changed
- Breaking
This is a major version release as it contains breaking changes.
Release note
This is a major version release as it contains breaking changes.
Breaking Changes
You will need to update your code to account for these changes before upgrading to cmdk@1.0.0.
value is now case sensitive 3dae25d
The value prop you pass to Command.Item and receive in onSelect is now case sensitive. But while the value is no longer lowercased, it is still trimmed.
Command.List is now required (CommandList in shadcn) 54aa261
Rendering the Command.List part (CommandList if using shadcn) is now mandatory. Otherwise, you should expect to see an error like this:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
The fix:
// Before
<Command label="Command Menu">
<Command.Input />
<Command.Item />
{/* ... */}
</Command>// After
<Command label="Command Menu">
<Command.Input />
<Command.List>
<Command.Item />
{/* ... */}
</Command.List>
</Command>Update [aria-disabled] and [aria-selected] CSS selectors c57e6b7
The aria-disabled and aria-selected props will now be set to false, instead of being undefined. If you previously used CSS selectors based on attribute presence, you will now need to use the attribute value.
/* Before */
[aria-disabled] {}
:not([aria-disabled]) {}
/* After */
[aria-disabled="true"] {}
[aria-disabled="false"] {}What's Changed
Added support for rendering
Command.Listin a portal in 54aa261Fixed
Command.Emptynot appearing on first render in be4388eFixed ESM support via new exports field
Added
disablePointerSelectionprop toCommandto disable item selection via pointer, like RaycastFix excessive re-renders when using
forceMountFixed to only scroll the selected item into view on first render and via keyboard
Bumped
@radix-ui/react-dialogversionFixed item sort not working correctly
Added
keywordsprop to theCommand.ItemcomponentAdded
asChildprop to all component partsFix suggestions list and loading progressbar labels
Allow keyboard navigation even when text input is not focused
Fix DOM error with quotes in the search query
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.