FormLayout with react-hook-form

UI Components for React
Post Reply
chrishj
Posts: 191
Joined: 11 Jul 2011, 21:58

10 Jul 2020, 21:11

I am currently using react-hook-form and hooks react-redux to manage input and state.

I have=ing an issue getting components such InputText when enclosed in a <form onSubmit={handleSubmit(onSubmitForm)}> tag to show as red or display an error message when I use the error property.

Code: Select all

<InputText
	  id="logonName"
	 name="logonName"
        type="text"
	onChange={onNameChange}
	errors={
		errors.logonName
		? {
			content: errors.logonName.message,
			pointing: "below",
		 }
		: false
		}
/>

Using semantic-ui-react these integrate, but I would like to migrate over to PrimeReact but this is a blocker

The issue appears to be caused by PrimeReact not exposing ref. https://github.com/react-hook-form/reac ... /issues/51
Can a change be made to allow PrimeReact to work with react-hook-form?

Thank you.
PrimeFaces:
J2EE 6 Glassfish 4.1 Mojarra 2.2.7 primefaces 6.2.7
Netbeans 8.1
database postgresql-9.11
Theme - Barcelona

PrimeReact:
4.2.2

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest