Updating to v6 breaks Material-UI's Autocomplete, component doesn't update field value, state always return integer 0 #2051
-
Describe the bug I've tried to add the To Reproduce
Expected behavior
Current behavior
Is anyone else having issues like this in the sandbox? Have you come to any solutions? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
hey @markcorrea there is breaking change with we have removed the following props:
and in favor of -<Controller
- as={CustomInput}
- valueName="textValue"
- onChangeName="onTextChange"
- control={control}
- name="test"
-/>
+<Controller
+ render={({ onChange, onBlur, value }) => (
+ <CustomInput onTextChange={onChange} onBlur={onBlur} textValue={value} />
+ )}
+ control={control}
+ name="test"
+/> |
Beta Was this translation helpful? Give feedback.
-
Noted! I haven't noticed this breaking change. Will update the component now. |
Beta Was this translation helpful? Give feedback.
hey @markcorrea there is breaking change with
Controller
. https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.mdwe have removed the following props:
and in favor of
render
prop