Comments (3)
You might need to use the Controller
component from react-hook-form: https://react-hook-form.com/get-started/#IntegratingwithUIlibraries.
When spreading the register('field')
you are passing onChange
but the Select.Root
is expecting onValueChange
.
Here is a working example https://codesandbox.io/s/shadcn-ui-select-react-hook-form-mgmdmv
from ui.
It works, thanks!
from ui.
@emicba thanks for sharing, ran into the same issue 🙏
from ui.
Related Issues (20)
- [feat]: NavigationMenuSub
- [feat]: Can we have Navigation Menu Subs?
- [bug]: Combobox example missed the `</Command>` close tag. HOT 1
- [bug]: datepicker get a wrong css HOT 9
- [bug]: fix `displayName` typo in `MenubarShortcut` component HOT 1
- [bug]: react-day-picker 9.0.0 release screws up Calendar component HOT 7
- [bug]: CLI does not add custom tailwind prefix for indicators in charts component
- [feat]: Select element ref HOT 2
- Calendar component for planning
- [bug]: Will got error on charts if build on nextjs 15 canary HOT 2
- [bug]: CommandItem presents an error in the NextJS when used HOT 2
- Popup Closes on Next Month Click and Repositions Incorrectly in JSP HOT 1
- [Docs]: While installing shadcn in Next.js project, we need to mention that developers need to`cd` into their project folder. HOT 4
- [feat]: It would be better if we could expand the code example
- [feat]: input number HOT 1
- [bug]: Documentation Website Not Functioning Properly
- [feat]: carousel initial slide
- [feat]: Bottom Nav
- [bug]: Select under a Form doesn't fous on error
- [bug]: Buttons and NavigationMenuLinks Blinking when I change the language of the project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui.