You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dagda1
changed the title
<title>
extraErrors continually getting merged into the internal state after calling mergeObjects with concatArrays true
Nov 15, 2022
Prerequisites
What theme are you using?
material-ui
Version
5.0.0-beta.12
Current Behavior
The
extraErrors
are continually merged into the<Form>
's internal state from theonChange
handler.I have narrowed it down to this line and this code:
Here is a video of it happening
cccc.mp4
If I set the last argument of
mergeObjects
to false, then everything works as expectedSetting it to false makes sense in my naive brain because of this line in
mergeObjects
If
newErrorSchema
looks like this:And
extraErrors
looks like this:Then the call to
mergeObjects
with thetrue
third argument will produce this:And so on.
Should
mergeObjects
be called with false?Expected Behavior
If the 3rd argument to
mergeObjects
is set tofalse
:Then it works as it should
bbbb.mp4
Steps To Reproduce
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: