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
Choose getIn based off Iterable.isIterable() #2423
Conversation
Currently this breaks when using `Record`s or other keyed Immutable objects that aren't `Map`s or `List`s. I've tested this in the context of an app I'm working on and these changes work in my case, but haven't verified with any tests. All `Iterable`s have `getIn` so it's a very low risk change.
Current coverage is 100% (diff: 100%)@@ master #2423 diff @@
=====================================
Files 65 65
Lines 1315 1315
Methods 0 0
Messages 0 0
Branches 0 0
=====================================
Hits 1315 1315
Misses 0 0
Partials 0 0
|
EDIT: The Happy for this to be merged in again if you all are. Probably needs something added in the docs about using things other than |
Good one. 👍 |
Released as |
* redux-form/master: (61 commits) Exported getFormNames (redux-form#2519) v6.5.0 Do not set FieldArray as touched on submit, as it causes its entry in storeState.fields to become an object instead of an array. The ARRAY_* reducers expects the fields entry to be an array. Fixes redux-form#2014. (redux-form#2473) Chore/switch shallowequal to lodash isequalwith (redux-form#2506) Keep track of registration count in registeredFields (redux-form#2470) fix: when the Field type is "file", value can not be updated (redux-form#2452) Remove undocumented name, validate and warn from FieldArray props. (redux-form#2467) Clarify what to do when StackOverflow questions get no answers (redux-form#2497) Excluded tests from code climate Enable Code Climate (redux-form#2486) Update ConnectedFields cached handlers when names prop changes. Fixes bug introduced by redux-form#2161. (redux-form#2474) Breaking change: Change Fields names instance API to return FormSection prefixed names, to be consistent with Field and FieldArray. (redux-form#2464) Add initial value selector (redux-form#2460) Add more tests for validateIfNeeded & warnIfNeeded (redux-form#2450) Provide validation functions with access to form props (redux-form#2431) feat(initialize): add keepSubmitSucceeded option (redux-form#2426) Synced Immutable and plain exports (+ tests) (redux-form#2425) Choose getIn based off Iterable.isIterable() (redux-form#2423) Fixed redux-form#2444 unexpected value updates when radio lose focus (redux-form#2445) Beerpay badge ...
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. |
Currently
structure.getIn
breaks when using ImmutableRecord
s or other keyed Immutable objects that aren'tMap
s orList
s, because it tries to use theplainGetIn
on those.I've tested this fix in the context of an app I'm working on and these changes work in my case, but haven't verified with any actual tests. By definition all
Iterable
s havegetIn
so I think it's a low risk change, at least one that's guaranteed to not break any existing desired behaviours withMap
s andList
s.The symptoms are that
ConnectedField
s are unable to find the field's values in state andvalue
is subsequently passed down as an empty string.