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
63.63k stars 3.59k forks source link

[bug]: combobox example page and command component runtime & function error #3474

Closed o0vO closed 2 months ago

o0vO commented 2 months ago

All codes I use is from the shadcn doc.

Describe the bug

In the link, the first preview example will cause error: image It needs to wrap with CommandList, but after that, all items is unselected, code image

Affected component/components

combobox, Command

How to reproduce

build a latest nextjs project

  1. copy code at here
  2. import in the main page.

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

"next": "14.1.4",
"react": "^18",
"react-dom": "^18",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
laurentlahmy commented 2 months ago

npm i cmdk@0.2.1

(check existing issues for context)

o0vO commented 2 months ago

npm i cmdk@0.2.1

(check existing issues for context)

That helps, thank you.

satishkumarsajjan commented 2 months ago

npm i cmdk@0.2.1 (check existing issues for context)

That helps, thank you.

so the issue is solved?

o0vO commented 2 months ago

npm i cmdk@0.2.1 (check existing issues for context)

That helps, thank you.

so the issue is solved?

Yep, close it still need some updates in repo