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
I have a dynamic text input that takes in register, fieldName, etc...
Example:
constmyInput=({ register, name, label, rules })=>{return(<divclassName="some-styles"><spanclassName="some-other-styles">{label}</span><input{...register(name,{
...rules,shouldUnregister: {keepDirty: true}// I know this doesn't exist but something like that?})}type="text"/></div>)}
is it possible to have the input unregister itself but ONLY if it is not dirty??
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
-
I have a dynamic text input that takes in
register
,fieldName
, etc...Example:
is it possible to have the input unregister itself but ONLY if it is not dirty??
Beta Was this translation helpful? Give feedback.
All reactions