shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
69.09k stars 4.1k forks source link

[bug]: The documentation for Combobox is outdated. #3329

Open thesidshah opened 5 months ago

thesidshah commented 5 months ago

Describe the bug

In the documentation, the combobox code uses a CommandGroup but not CommandList, furthermore even after adding CommandList users have to figure out why the options are disabled by default on the example code.

The breaking changes in v1.0.0 https://github.com/pacocoursey/cmdk/releases/tag/v1.0.0 are responsible for this. And the documentation needs to be updated to reflect the changes.

Affected component/components

Combobox

How to reproduce

Go to https://ui.shadcn.com/docs/components/combobox Copy the code next to the preview button Try running it.

Codesandbox/StackBlitz link

https://ui.shadcn.com/docs/components/combobox

Logs

No response

System Info

Mac, shadcn for nextjs

Before submitting

josiaharkson commented 5 months ago

Same here

darrenswhite commented 5 months ago

Also getting this same issue! :+1:

Joshua-Pow commented 5 months ago

I thought I was going insane thank you so much haha

fivetwentysix commented 5 months ago

After adding the CommandList component, I also can't click on any of the CommandItems but pressing Enter still works to trigger the onSelect event of the item...

Qodestackr commented 5 months ago

After adding the CommandList component, I also can't click on any of the CommandItems but pressing Enter still works to trigger the onSelect event of the item...

Yes noticed this too. @thesidshah whats your take on this?

atleugim commented 5 months ago

Same issue here, also after including CommandList

thesidshah commented 5 months ago

@Qodestackr @atleugim that's because of the css arial-disable for CommandList, checkout my PR for changes

viraniaman94 commented 4 months ago

Just downgrade "cmdk": "^0.2.0", until fix is merged.