Releases: pacocoursey/cmdk
v1.0.4
v1.0.3
- Fix
use-sync-external-store
shim for compatibility with Next.js 15 and React 19 RC
v1.0.1
What's Changed
- fix: docs mistake we are no longer lowercasing by @itsjoeoui in #227
- feat: export defaultFilter by @evanob in #229
- chore: add more details to package.json by @andipaetzold in #228
- chore(deps): bump the npm_and_yarn group across 2 directories with 2 updates by @dependabot in #226
- fix: controlled search change with hidden Command.List by @vltansky in #217
- fix: Framer example capitalization of values by @arihanv in #231
- fix: fix compiling code Array.from(void 0) by @nenya1840 in #237
- fix: useId backward compatibility by @phsantiago in #165
- Relax dependencies on Radix-UI to SemVer MAJOR releases by @eps1lon in #278
- feat: allow react v19 as peer dep by @Yonom in #318
- Upgrade @radix-ui/react-id by @tmcw in #297
- fix: useSyncExternalStore backward compatibility by @MateoKruk in #296
- fix(context): read disablePointerSelection from propsRef by @f0rr0 in #314
New Contributors
- @itsjoeoui made their first contribution in #227
- @evanob made their first contribution in #229
- @andipaetzold made their first contribution in #228
- @dependabot made their first contribution in #226
- @vltansky made their first contribution in #217
- @arihanv made their first contribution in #231
- @nenya1840 made their first contribution in #237
- @phsantiago made their first contribution in #165
- @eps1lon made their first contribution in #278
- @Yonom made their first contribution in #318
- @tmcw made their first contribution in #297
- @MateoKruk made their first contribution in #296
- @f0rr0 made their first contribution in #314
Full Changelog: v1.0.0...v1.0.1
v1.0.0
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 [email protected]
.
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.List
in a portal in 54aa261 - Fixed
Command.Empty
not appearing on first render in be4388e - Fixed ESM support via new exports field by @SoYoung210 in #141
- Added
disablePointerSelection
prop toCommand
to disable item selection via pointer, like Raycast by @joaom00 in #116 - Fix excessive re-renders when using
forceMount
by @joaom00 in #143 - Fixed to only scroll the selected item into view on first render and via keyboard by @joaom00 in #135
- Bumped
@radix-ui/react-dialog
version by @wmcheung in #194 - Fixed item sort not working correctly by @pengx17 in #182
- Added
keywords
prop to theCommand.Item
component by @itaikeren in #158 - Added
asChild
prop to all component parts by @joaom00 in #138 - Fix suggestions list and loading progressbar labels by @afercia in #204
- Allow keyboard navigation even when text input is not focused by @glocore in #61
- Fix DOM error with quotes in the search query by @yjl9903 in #223
New Contributors
- @SoYoung210 made their first contribution in #141
- @wmcheung made their first contribution in #194
- @pengx17 made their first contribution in #182
- @itaikeren made their first contribution in #158
- @afercia made their first contribution in #204
- @glocore made their first contribution in #61
- @yjl9903 made their first contribution in #223
Full Changelog: v0.2.1...v1.0.0
v0.2.1
Been a whileβthis is a hefty release. Sorry for the delay.
What's New
- Bring in local dependency of command-score with vastly improved filtering performance by default by @pacocoursey in #130
- Add defaultValue prop to
<Command />
by @revogabe in #123 - Add
forceMount
prop to<Command.Item />
and<Command.Group />
by @MildTomato in #101 - Adds
overlayClassName
andcontentClassName
props to<Command.Dialog />
: by @joaom00 in #114 - Add
data-disabled
to<Command.Item />
by @joaom00 in #122 - Add
aria-activedescendant
in<Command.Input />
by @joaom00 in #108 - Use
offsetHeight
to calculate list height by @joaom00 in #121 - Add option for disabling vim bindings by @bkrausz in #168
What's Fixed
- Fixed a bug where using controlled item values would accidentally become uncontrolled if there are no results by @joaom00 in #109
- Fixed items on mobile are now correctly selected on tap by @joaom00 in #113
- Fixed a bug where focus would jump back to the first item instead of respecting the controlled value @joaom00 in #112
- Fixed the props for the
<Command.Loading />
to indicate it spreads onto adiv
element by @0xcadams in #154 - Fixed pressing [Enter] to select an item while in the middle of an IME composition by @hajimism in #166
- Fixes a bug where backspacing would not properly reveal items that didn't have their value explicitly set by @WITS in #176
Docs
- Document forceMount prop by @joaom00 in #134
- Update dialog example by @joaom00 in #136
- Add links to title badges by @jrysana in #151
- Fix missing code block markup by @0xcadams in #153
Internal
- ci: Use pnpm/action-setup by @pacocoursey in #110
New Contributors
- @joaom00 made their first contribution in #109
- @MildTomato made their first contribution in #101
- @revogabe made their first contribution in #123
- @jrysana made their first contribution in #151
- @0xcadams made their first contribution in #153
- @bkrausz made their first contribution in #168
- @hajimism made their first contribution in #166
- @WITS made their first contribution in #176
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- Add "data-selected" attribute to Item Component by @Saintpreston in #80
- Fix Playwright Tests by @thomaswang in #81
- refactor(pages/index): remove unnecessary fragment by @nicholaschiang in #86
- fix: documentation typo for
GroupProps
by @pondorasti in #91 - feat: export individual components to allow for tree shaking by @Pagebakers in #96
New Contributors
- @Saintpreston made their first contribution in #80
- @thomaswang made their first contribution in #81
- @nicholaschiang made their first contribution in #86
- @pondorasti made their first contribution in #91
- @Pagebakers made their first contribution in #96
Full Changelog: v0.1.21...v0.2.0
v0.1.21
What's Changed
- prune: yarn.lock; docs(website): pnpm; chore: enforce pnpm by @JeromeFitz in #39
- Update hook name in README by @caumeira in #41
- remove dollar sign from code snippet by @kuldar in #44
- fix(keybinds):
last
fn respects disabled items by @thiskevinwang in #47 - fix: Upgrade radix-ui/react-dialog to v1 by @pacocoursey in #48
- arrow keys wrap around by @Kilian in #57
- Allow setting a container for Radix.Portal by @Kilian in #58
- fix: attempt to prevent exceeding ResizeObserver loop limit by @Simek in #65
- fix: call
onValueChange
after filtering the list by @Andarist in #70
New Contributors
- @JeromeFitz made their first contribution in #39
- @caumeira made their first contribution in #41
- @kuldar made their first contribution in #44
- @thiskevinwang made their first contribution in #47
- @Kilian made their first contribution in #57
- @Simek made their first contribution in #65
- @Andarist made their first contribution in #70
Full Changelog: v0.1.19...v0.1.21
v0.1.19
v0.1.18
What's Changed
- Use [hidden] on group instead of changing render structure by @pacocoursey in #27
Full Changelog: https://github.com/pacocoursey/cmdk/commits/v0.1.18
v0.1.17
- fix:
className
is now correctly forwarded to all items and groups