Repository: react-hook-form/react-hook-form (TypeScript)

Issue:
issue: regression with omit prop on field 
### Version Number

7.49.2

### Codesandbox/Expo snack

https://codesandbox.io/p/sandbox/fast-sun-d8m2tc?file=%2Fsrc%2FApp.tsx

### Steps to reproduce

Don't pass a disabled to useForm or Controller, then log the fields object.
It shows the disabled property as undefined.


### Expected behaviour
The issue was previously described at #10932. Then behavior was fixed with https://github.com/react-hook-form/react-hook-form/commit/5fe56141a5b756e1d928efa0fbf2d5635edd8b58

But it came back with the changes at https://github.com/react-hook-form/react-hook-form/commit/0d565fcf944621f5510da4623129ffbd238f9530#diff-3f5bdfa7d822b4562b8e1c72dd1996197fe93478b039779bb78853ab3ae2a3feR129

The code does a check for `isBoolean(formState.disabled)`, but `disabled` is defined as a getter and it returns false when `disabled` is not present on useForm.


### What browsers are you seeing the problem on?

Chrome

### Relevant log output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct


Discussion:
Could you refer to the bug report on the issue? 
i have same issue with version "^7.49.2"
When use `render` in `Controller`, `field` doesn't provider `disabled` property.

```jsx
<Controller
  name={name}
  rules={rules}
  disabled={disabled}
  render={({ field }) => {
    console.debug('controller render field', field); // there is no disabled property
  }}
/>
```



Patch:
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml
index df1117118cd..cba10e88a8d 100644
--- a/app/pnpm-lock.yaml
+++ b/app/pnpm-lock.yaml
@@ -7,7 +7,7 @@ settings:
 dependencies:
   '@hookform/resolvers':
     specifier: 2.8.8
-    version: 2.8.8(react-hook-form@7.48.2)
+    version: 2.8.8(react-hook-form@7.49.2)
   '@material-ui/core':
     specifier: ^4.12.3
     version: 4.12.4(@types/react@17.0.52)(react-dom@17.0.2)(react@17.0.2)
@@ -436,7 +436,7 @@ packages:
       '@hapi/hoek': 9.3.0
     dev: false
 
-  /@hookform/resolvers@2.8.8(react-hook-form@7.48.2):
+  /@hookform/resolvers@2.8.8(react-hook-form@7.49.2):
     resolution: {integrity: sha512-meAEDur1IJBfKyTo9yPYAuzjIfrxA7m9Ov+1nxaW/YupsqMeseWifoUjWK03+hz/RJizsVQAaUjVxFEkyu0GWg==}
     peerDependencies:
       react-hook-form: ^7.0.0
diff --git a/app/src/app.tsx b/app/src/app.tsx
index f4e2bac0cc6..34bcf0bc4b0 100644
--- a/app/src/app.tsx
+++ b/app/src/app.tsx
@@ -40,7 +40,7 @@ import SetValueAsyncStrictMode from './setValueStrictMode';
 import { DelayError } from './delayError';
 import './style.css';
 import FormComponent from './form';
-import DisabledFields from "./disabledFields";
+import DisabledFields from './disabledFields';
 
 const App: React.FC = () => {
   return (
diff --git a/app/src/disabledFields.tsx b/app/src/disabledFields.tsx
index 679e42bb2a1..1f8df401d4f 100644
--- a/app/src/disabledFields.tsx
+++ b/app/src/disabledFields.tsx
@@ -1,22 +1,34 @@
 import React from 'react';
-import { useForm } from "react-hook-form";
+import { useForm } from 'react-hook-form';
 
 const toggle = (state: boolean) => !state;
 
 export default function DisabledFields() {
-    const [formDisabled, setFormDisabled] = React.useState(false);
-    const [firstDisabled, setFirstDisabled] = React.useState(false);
-    const [secondDisabled, setSecondDisabled] = React.useState(true);
-    const { register } = useForm({ disabled: formDisabled });
+  const [formDisabled, setFormDisabled] = React.useState(false);
+  const [firstDisabled, setFirstDisabled] = React.useState(false);
+  const [secondDisabled, setSecondDisabled] = React.useState(true);
+  const { register } = useForm({ disabled: formDisabled });
 
-    return (
-        <form>
-            <button type="button" onClick={() => setFormDisabled(toggle)}>Toggle form</button>
-            <button type="button" onClick={() => setFirstDisabled(toggle)}>Toggle Field 1</button>
-            <button type="button" onClick={() => setSecondDisabled(toggle)}>Toggle Field 2</button>
+  return (
+    <form>
+      <button type="button" onClick={() => setFormDisabled(toggle)}>
+        Toggle form
+      </button>
+      <button type="button" onClick={() => setFirstDisabled(toggle)}>
+        Toggle Field 1
+      </button>
+      <button type="button" onClick={() => setSecondDisabled(toggle)}>
+        Toggle Field 2
+      </button>
 
-            <input placeholder="Field 1" {...register('first', { disabled: firstDisabled }) } />
-            <input  placeholder="Field 2" {...register('second', { disabled: secondDisabled }) } />
-        </form>
-    )
-}
\ No newline at end of file
+      <input
+        placeholder="Field 1"
+        {...register('first', { disabled: firstDisabled })}
+      />
+      <input
+        placeholder="Field 2"
+        {...register('second', { disabled: secondDisabled })}
+      />
+    </form>
+  );
+}
diff --git a/src/useController.ts b/src/useController.ts
index cd5549e8876..cc2b06ae074 100644
--- a/src/useController.ts
+++ b/src/useController.ts
@@ -126,7 +126,7 @@ export function useController<
     field: {
       name,
       value,
-      ...(isBoolean(disabled) || isBoolean(formState.disabled)
+      ...(isBoolean(disabled) || formState.disabled
         ? { disabled: formState.disabled || disabled }
         : {}),
       onChange: React.useCallback(


Test patch:
diff --git a/src/__tests__/controller.test.tsx b/src/__tests__/controller.test.tsx
index bfb9d3983d3..53f12e7039c 100644
--- a/src/__tests__/controller.test.tsx
+++ b/src/__tests__/controller.test.tsx
@@ -1544,4 +1544,51 @@ describe('Controller', () => {
 
     expect(screen.getByRole('textbox')).toHaveValue('b');
   });
+
+  it('should respect disabled state set on the input element', () => {
+    const Component = () => {
+      const { control } = useForm();
+      return (
+        <Controller
+          defaultValue=""
+          name="test"
+          render={({ field }) => <input disabled {...field} />}
+          control={control}
+        />
+      );
+    };
+
+    render(<Component />);
+
+    expect(screen.getByRole('textbox')).toBeDisabled();
+  });
+
+  it('should respect disabled state set on the Controller component', () => {
+    const Component = () => {
+      const { control } = useForm();
+
+      const [disabled, setDisabled] = React.useState(true);
+
+      return (
+        <>
+          <Controller
+            defaultValue=""
+            name="test"
+            disabled={disabled}
+            render={({ field }) => <input {...field} />}
+            control={control}
+          />
+          <button onClick={() => setDisabled(false)}>disable</button>
+        </>
+      );
+    };
+
+    render(<Component />);
+
+    expect(screen.getByRole('textbox')).toBeDisabled();
+
+    fireEvent.click(screen.getByRole('button'));
+
+    expect(screen.getByRole('textbox')).toBeEnabled();
+  });
 });