You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's challenging enough to get a boolean value assigned to a property tied to a checkbox. But I'm not seeing anyone who has done this successfully inside a Fieldarray.
The following works to hold a boolean for the prop associated to name for a checkbox Field when name is static ...
...
function Checkbox({ field, type }) {
return (
<input {...field} type={type} />
); }
However, when inside a Fieldarray, name is no longer static and...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It's challenging enough to get a boolean value assigned to a property tied to a checkbox. But I'm not seeing anyone who has done this successfully inside a Fieldarray.
The following works to hold a boolean for the prop associated to name for a checkbox Field when name is static ...
...
function Checkbox({ field, type }) {
return (
<input {...field} type={type} />
); }
However, when inside a Fieldarray, name is no longer static and...
name={values.thingsList[index].enabled}
...doesn't work.
Beta Was this translation helpful? Give feedback.
All reactions