Comments (7)
Hi,
You can use react-hooks-form with PrimeReact;
https://primefaces.org/primereact/showcase/#/reacthookform
from react-hook-form.
thanks @mertsincan
from react-hook-form.
@bluebill1049, Thank you very much for this great form library. I really enjoyed integrating PrimeReact library and React Hook Form.
from react-hook-form.
hey,
I checked PrimeReact component source code, looks like they are not exposing ref
at all. React Hook Form is not compatible with this UI library. :( maybe consider using material ui or another ui library if you can, otherwise, I don't think I can do much about it :(
cheers
bill
from react-hook-form.
I am going to close this issue, but leave an example for you :)
https://codesandbox.io/s/72j69vnk1x
in case you decide to go with another library like material UI
from react-hook-form.
It's possible to wrap the primereact component within a react-hook-form component to get it registered on the form:
https://react-hook-form.com/advanced-usage/#ControlledmixedwithUncontrolledComponents
from react-hook-form.
Hi,
I'm working with prime react & react-hook form validation.
But i couldnt get defaultvalues in useEffect. Or I cant set values from api in useEffect. what must i do for this? I'm using component inside components
MasterComponent
childcomponent 1
childcomponent 2
Master component includes two or more child component. And my submit button is in master component.
Here is a sample for only load values from api.
https://codesandbox.io/s/angry-gagarin-ypb3d
from react-hook-form.
Related Issues (20)
- issue: when use formState.isValid, fieldArray replace will make resolver call many times HOT 1
- RHF is triggering 3 times as many rerenders on validation HOT 4
- issue: removing last number with trailing zeros deletes all the right side zeros, when used with `react-number-format` HOT 1
- issue: formState isDirty breaks under certain conditions
- issue: `useWatch` return value does not match `watch` when used with `useFieldArray` HOT 1
- issue: Fields built with the Controller component does not unregister properly
- issue: Cannot register to an object that contains an empty string as a key
- When use setValue({ shouldValidate: true }), it triggers rerender even if formState.errors haven't changed
- issue: useFieldArray fields is not updated when input changes HOT 1
- issue: useConroller creates empty objects for nested fields HOT 1
- can the field property returned by useController return if the field is required or not?
- issue: validate rules shift errors HOT 2
- issue: Fields dirty state is not updated when passing values to useForm since 7.51.0 HOT 5
- Issue: Error doesn't clear even when isValid state is 'true' HOT 2
- issue: Controller rules.pattern doesn't apply new value without explicit undefined HOT 2
- issue + feature request: defaultValue of type `Date` is not applied to`<input type=date>` - with `register` API HOT 4
- issue: Infinite Loop: Submitting FormContext with Nested FormContext causes repeated error rendering HOT 1
- issue: Resolver's return error should properly set formState: {error}
- issue: Validation issue after unmounting fields
- issue: ReactNative password field not obscuring text
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 react-hook-form.