Next.js Discord

Discord Forum

Shadcn Combobox search for label instead of value

Answered
Eastern Phoebe posted this in #help-forum
Open in Discord
Avatar
Eastern PhoebeOP
I'm currently working on a project using the Shadcn combobox component and I've encountered a challenge. The combobox is populated with an array of objects, each having a value and a label. The current implementation searches for the value when a selection is made.
Answered by Korat
Image
View full answer

6 Replies

Avatar
Eastern PhoebeOP
Image
Avatar
Korat
Damn, nice catch brother,

Someone mentioned this in https://github.com/shadcn-ui/ui/issues/458
Avatar
Eastern PhoebeOP
yeah i saw that one as well. but i havent found a solution ...
Avatar
Korat
Image
Answer
Avatar
Korat
Here you have the solution man, happy coding
Avatar
Eastern PhoebeOP
Hi @Korat thank you so much! You're the GOAT!