Swapping w/ nested field arrays leads to crash #8753
-
Version Number7.33.1 Codesandbox/Expo snackhttps://codesandbox.io/s/react-hook-form-js-forked-mootdl?file=/src/App.js Steps to reproduceClick the first swap button, it breaks the app. Second/third swap buttons work fine. But if you comment out the default values, then it will work if you:
Expected behaviourSwap should work with nested fields with or without default values being set What browsers are you seeing the problem on?Chrome Relevant log outputFrom my own app:
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
thanks for the issue report, please check if you have registered both inputs, which are |
Beta Was this translation helpful? Give feedback.
thanks for the issue report, please check if you have registered both inputs, which are
value
andoperator
inputs.useFieldArray
fields are not optional they should both be registered, this runtime error reveals that the input is not registered and mounted. we can patch or prevent this error, but this would potentially lead to other unexpected behavior.