How to validate the value of a select element whose options are generated by Props passed into a React component #3722
-
I have a select element whose options are being generated using an array passed in from a higher level element. I can't use an enum because I don't know the options until the component is rendered, and using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Here's the component (I'm learning React so please be gentle if something is particularly ugly).
|
Beta Was this translation helpful? Give feedback.
-
Ok, of course right after I post this, I see the issue. 🫤 Need to remove the valueAsNumber flags form the register functions. |
Beta Was this translation helpful? Give feedback.
Ok, of course right after I post this, I see the issue. 🫤 Need to remove the valueAsNumber flags form the register functions.