This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Replies: 1 comment
-
|
I figured it out. All I had to do was not useEffect(() => {
if (!disabled) {
registerField({
name: fieldName,
ref: ref.current,
path: 'value'
});
}
}, [fieldName, registerField, disabled]); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a form that contains these two fields, which I only use to display content:
However when clikcing the submit button, the handleSubmit function still reads them:
How do I make it that fields that are disabled will not be read?
I don't know if this is supposed to be the default behavior. If it is, maybe it's my Input component fault, that goes like this:
Beta Was this translation helpful? Give feedback.
All reactions