🧱 feature: disable prop for useForm#10496
Conversation
|
This branch is running in CodeSandbox. Use the links below to review this PR faster. |
|
Size Change: +159 B (+1%) Total Size: 20.1 kB
|
disable prop for useForm
b84e25f to
0bf9664
Compare
disable prop for useFormdisable prop for useForm
|
cc @bengry |
|
Thank you for your contributions! This Pull Request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Best, RHF Team ❤️ |
|
I don't know if this is related, but components using fields like this: <Controller
control={control}
render={({ field }) => (
<TextInput
disabled={true}
{...field}
/>
)}
/>Stopped being disabled in the latest version |
<Controller
control={control}
render={({ field }) => (
<TextInput
{...field}
disabled={true}
/>
)}
/>should fix this. |
|
@bluebill1049 I know 😂😂 I posted it here just in case it was unintentional. I would expect that if the |
I am pretty sure it returns undefined, could you verify it? |
Well, my apologies since I thought that doing something like this in JavaScript resulted in {
disabled: true,
disabled: undefined,
}When in reality the I don't know, sorry for the confusion. |
|
should be patched in the next release. |
|
Please look at this discussion: https://github.com/orgs/react-hook-form/discussions/11057 |
disabledpropdisabledprops foruseForm