Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immutable FieldArrays broken with Immutable 4.0.0-rc.5+ #3489

Closed
ssilve1989 opened this issue Oct 6, 2017 · 17 comments · Fixed by uzh-bf/klicker-uzh#319
Closed

Immutable FieldArrays broken with Immutable 4.0.0-rc.5+ #3489

ssilve1989 opened this issue Oct 6, 2017 · 17 comments · Fixed by uzh-bf/klicker-uzh#319

Comments

@ssilve1989
Copy link

Are you submitting a bug report or a feature request?

Bug

What is the current behavior?

Using FieldArrays results in Uncaught TypeError: original.mergeDeepWith is not a function

What is the expected behavior?

Expected to not do that.

Sandbox Link

What's your environment?

redux-form@7.0.4
immutable@4.0.0-rc.7
node@7.10.1

Other information

The method mergeDeepWith has been removed from the List API since 4.0.0-rc.5 so now any interaction with FieldArrays causes this exception to show up.

@erikras
Copy link
Member

erikras commented Oct 6, 2017

Try v7.1.0? That's the first version with immutable@4.0.0-rc.5 used in the tests.

@jo-flynn
Copy link

jo-flynn commented Oct 6, 2017

I'm also experiencing this issue when calling input.onChange in a Field component within a FieldArray.

I'm running redux-form@7.1.0 & immutable@4.0.0-rc.7.

jkomyno pushed a commit to jkomyno/redux-form that referenced this issue Oct 9, 2017
erikras pushed a commit that referenced this issue Oct 9, 2017
* Extends logic of PR #3460 to onFocus and onBlur. Also prevents issue #3489 locking version of immutable

* Removed useless line breaks
@ssilve1989
Copy link
Author

@erikras I still see the error TypeError: original.mergeDeepWith is not a function using FieldArrays with redux-form@v7.1.0

@thessem
Copy link

thessem commented Nov 29, 2017

mergeDeepWith was removed here immutable-js/immutable-js#1344

@TikiTDO
Copy link

TikiTDO commented Nov 30, 2017

I tried replicating the old mergeDeep behavior here: TikiTDO@fd7d616

It seems to work well enough for my use case, but I'm not entirely sure what problem is being solved here, so I can't speak to other scenarios.

@TikiTDO
Copy link

TikiTDO commented Nov 30, 2017

@erikras If you get a second could you comment on the above fix? This issue is hitting us pretty hard.

@bogdaniy
Copy link

bogdaniy commented Dec 4, 2017

All my form with FieldArrays is broken after updating immutable-js version to 4.0.0-rc.7, my redux-form version is 7.2.0

@IKatsuba
Copy link
Contributor

IKatsuba commented Dec 7, 2017

Any news? We are very much looking forward to solving the problem

@gustavohenke
Copy link
Collaborator

No news, sorry.

IKatsuba added a commit to IKatsuba/redux-form that referenced this issue Dec 14, 2017
@IKatsuba
Copy link
Contributor

@gustavohenke do you plan to solve this issue?

@TikiTDO
Copy link

TikiTDO commented Dec 14, 2017

@Defenderbass I'm still waiting for someone to comment on my PR, but we've been using it for our project for a couple of weeks now with no issues.

@IKatsuba
Copy link
Contributor

@TikiTDO I tried to use your option, but the fields began to disappear from the array. That is, the merge was not done correctly. I had to come up with my own version

@TikiTDO
Copy link

TikiTDO commented Dec 14, 2017

@Defenderbass I tried to reproduce what the functionality of the original mergeDeepWith, but didn't spend too much time on it. I can go fix mine, but if you believe yours works then I'm good with that too. If you have a branch I can try let me know and I'll see if it solves my problem too.

@IKatsuba
Copy link
Contributor

@TikiTDO Look here #3692 . There everything is corny, but it works

@TikiTDO
Copy link

TikiTDO commented Dec 14, 2017

@Defenderbass Sounds good. I'm in an all day meeting, but I'll give it a try this evening.

@erikras
Copy link
Member

erikras commented Jan 18, 2018

Published fix in v7.2.1.

@lock
Copy link

lock bot commented Jan 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
8 participants