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

Documentation for which fields and methods needs passing when nested fields are used for ValidatedFields #16755

Closed
cordial opened this issue Oct 20, 2021 · 4 comments

Comments

@cordial
Copy link

cordial commented Oct 20, 2021

Overview of the feature request

Inside the new react-hook-form ValidatedField component (react jhipster), there is a line that says -
" For complex use cases or for nested children, use Reactstrap form elements

  • or ValidatedField or ValidatedInput and pass methods and values from react-hook-form's useForm hook"

However, there is no mention of which methods/values to pass and I am struggled to nest ValidatedField, which seems a pretty basic use case. Could you add some more clarity to the comments to tell me which I would need for the validation to work in a nested case (just a basic example of required is maybe all that is needed).

Motivation for or Use Case

I would like my form to be populated by a js object rather than having endless ValidatedField components.

Related issues or PR

I had a look and can't see anything related.

  • [x ] Checking this box is mandatory (this is just to show you read everything)
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs 😃.
Comment or this will be closed in 7 days

@pascalgrimaud pascalgrimaud added this to the 7.4.1 milestone Nov 30, 2021
@pascalgrimaud pascalgrimaud reopened this Jan 11, 2022
@gcdus
Copy link

gcdus commented Feb 20, 2022

It seems that I've just raised a similar issue, this is a very basic feature that was always available in Jhipster, and developers were able to design the form using multiple columns view as needed and now it seems that we are restricted to one row per field only unless we can start using the library features outside of the framework. This simple wrapper is good only if the page has a few fields, however, any web page having more fields needs to rearrange in column view. We can definitely use the library and bypass the Jhipster generated wrapper, however, sample code about workaround of how to pass method and values from react hook form will be helpful for a non-react developer.

@deepu105
Copy link
Member

deepu105 commented Apr 7, 2022

Please refer to the documentation of react-hook-form as the provided components are just thin wrapper over that

@cordial
Copy link
Author

cordial commented Apr 7, 2022

the validated field as is is useless in anything but the most basic of cases. Referring to the react-hook-form docs just made me use react-hook-form instead of validatedField and validatedForm. If you're not going to support them, don't use them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants