remix-hook-form icon indicating copy to clipboard operation
remix-hook-form copied to clipboard

Property 'root' does not exist on type

Open mauriciovillam opened this issue 1 year ago • 7 comments

Hello! I believe the library may be using the wrong type for the errors property of formState. Perhaps it should use FieldErrors rather than FieldErrorsImpl.

Also, the "root" error doesn't populate back in the formState if passed from the actions.

image image image image

"root" is supported by react-hook-form

image

mauriciovillam avatar Nov 25 '23 19:11 mauriciovillam

I have the same issue. I need a field to put my general server errors into. I'm quite sure this used to work, but not after the 3.x updates

adamshiervani avatar Dec 13 '23 12:12 adamshiervani

Pinpointed the issue, will be fixed in next release!

AlemTuzlak avatar Dec 13 '23 12:12 AlemTuzlak

Wonderful. Appreciate it!

adamshiervani avatar Dec 13 '23 12:12 adamshiervani

Thank you @AlemTuzlak !!

mauriciovillam avatar Dec 13 '23 15:12 mauriciovillam

I've made the errors have the correct type with 3.2.3 and looking into making the root error be populated and work

AlemTuzlak avatar Dec 13 '23 16:12 AlemTuzlak

Any updates?

adamshiervani avatar Jan 09 '24 20:01 adamshiervani

Should work with the latest version of react and remix hook form I believe

AlemTuzlak avatar Jan 14 '24 10:01 AlemTuzlak

I think this works now, feel free to re-open if I'm wrong but I've tested it locally and all is good

AlemTuzlak avatar Jun 20 '24 09:06 AlemTuzlak