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

Add initial value selector #2460

Merged
merged 2 commits into from Jan 20, 2017
Merged

Conversation

griffinmichl
Copy link
Contributor

@griffinmichl griffinmichl commented Jan 15, 2017

This seemed like an important missing selector. While a user of redux-form will usually have access to the initial values they passed in one way or another, exposing a selector for them can make it easier to hook into redux-form with epic, thunks, and sagas (invoking the selector on getState()) and keep business logic out of the component.

I'd be happy to describe a specific use case if desired.

@codecov-io
Copy link

codecov-io commented Jan 15, 2017

Current coverage is 100% (diff: 100%)

Merging #2460 into master will not change coverage

@@           master   #2460   diff @@
=====================================
  Files          65      66     +1   
  Lines        1322    1325     +3   
  Methods         0       0          
  Messages        0       0          
  Branches        0       0          
=====================================
+ Hits         1322    1325     +3   
  Misses          0       0          
  Partials        0       0          

Powered by Codecov. Last update d3f5146...f53be70

Copy link
Collaborator

@gustavohenke gustavohenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@erikras
Copy link
Member

erikras commented Jan 26, 2017

Released as v6.5.0.

selvagsz added a commit to selvagsz/redux-form that referenced this pull request Feb 6, 2017
* 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
  ...
@lock
Copy link

lock bot commented Jun 1, 2018

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 Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants