Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Error in documentation of combobox #3757

Open
2 tasks done
Invito101 opened this issue May 16, 2024 · 5 comments
Open
2 tasks done

[bug]: Error in documentation of combobox #3757

Invito101 opened this issue May 16, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Invito101
Copy link

Describe the bug

There's an error in the documentation of Combobox ( https://ui.shadcn.com/docs/components/combobox ). The components after the CommandInput needs to wrapped around CommandList according to the Command docs ( https://ui.shadcn.com/docs/components/command ).

shadcnerror

Affected component/components

Combobox

How to reproduce

  1. Go to the code for the examples given in the Combobox docs ( https://ui.shadcn.com/docs/components/combobox )
  2. Running that code as a component gives an error.

Codesandbox/StackBlitz link

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

Logs

No response

System Info

none

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@Invito101 Invito101 added the bug Something isn't working label May 16, 2024
@TanishqSharma2022
Copy link

I will be fixing this. Not a bug, its just a typo ig.

@Invito101
Copy link
Author

I will be fixing this. Not a bug, its just a typo ig.

I initially marked it as a bug instead of a typo because it's not just a simple spelling mistake, it causes an error that is quite complex to debug, especially for newbies like me. However, if it's not a significant issue, I will use the 'typo' label instead in the future.

@lucasfarias2
Copy link

lucasfarias2 commented May 20, 2024

Quick fix for this: Just wrap your <CommandEmpty> and <CommandGroup> with <CommandList>

@Invito101
Copy link
Author

Quick fix for this: Just wrap your <CommandEmpty> and <CommandGroup> with <CommandList>

Yes, I just reported so that the documentation can be fixed.

@gajakannan
Copy link

I was banging my head for 3 days on this particular issue, tried several different things, and for a newbie, as @Invito101 said not easy to find out what is causing this issue until I decided to look at the issue log. was such a simple fix. I agree this needs to be updated in the document, otherwise people like me almost would have given up on combobox and used something else just because we couldnt get to this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants