diff --git a/app/components/ui/checkout/index.js b/app/components/ui/checkout/index.js index cac0c023..e4cba8f3 100644 --- a/app/components/ui/checkout/index.js +++ b/app/components/ui/checkout/index.js @@ -14,6 +14,7 @@ import capitalize from 'lodash/capitalize'; import FormToggle from 'components/ui/form/form-toggle'; import ValidationError from 'components/ui/form/validation-error'; import Input from 'components/ui/form/input'; +import { removeInvalidInputProps } from 'lib/form'; import SiftScience from 'lib/sift-science'; const Checkout = React.createClass( { @@ -106,7 +107,7 @@ const Checkout = React.createClass( {
+ } diff --git a/app/components/ui/connect-user/verify-user/index.js b/app/components/ui/connect-user/verify-user/index.js index 91335535..befbeee9 100644 --- a/app/components/ui/connect-user/verify-user/index.js +++ b/app/components/ui/connect-user/verify-user/index.js @@ -7,6 +7,7 @@ import Footer from 'components/ui/connect-user/footer'; import Form from 'components/ui/form'; import Header from 'components/ui/connect-user/header'; import i18n from 'i18n-calypso'; +import Input from 'components/ui/form/input'; import ResendSignupEmail from './resend-signup-email'; import styles from './styles.scss'; import ValidationError from 'components/ui/form/validation-error'; @@ -77,7 +78,7 @@ const VerifyUser = React.createClass( {
- +
@@ -135,7 +136,7 @@ const VerifyUser = React.createClass( {
- + diff --git a/app/components/ui/contact-information/index.js b/app/components/ui/contact-information/index.js index bda43ade..306a6b06 100644 --- a/app/components/ui/contact-information/index.js +++ b/app/components/ui/contact-information/index.js @@ -13,6 +13,7 @@ import DocumentTitle from 'components/ui/document-title'; import Form from 'components/ui/form'; import State from 'components/ui/contact-information/state'; import Input from 'components/ui/form/input'; +import { removeInvalidInputProps } from 'lib/form'; import styles from './styles.scss'; import CheckoutProgressbar from 'components/ui/checkout-progressbar'; import ValidationError from 'components/ui/form/validation-error'; @@ -319,7 +320,7 @@ class ContactInformation extends React.Component {
@@ -21,7 +23,7 @@ const State = ( { disabled, field, states, onBlur } ) => { } else { content = ( diff --git a/app/components/ui/sunrise-home/index.js b/app/components/ui/sunrise-home/index.js index 30a6779d..107ba5ad 100644 --- a/app/components/ui/sunrise-home/index.js +++ b/app/components/ui/sunrise-home/index.js @@ -90,8 +90,8 @@ const SunriseHome = React.createClass( {
- { explanations.map( explanation => ( -
+ { explanations.map( ( explanation, index ) => ( +
{ explanation.title }
diff --git a/app/lib/form/index.js b/app/lib/form/index.js index 0f883436..b2d6d4f5 100644 --- a/app/lib/form/index.js +++ b/app/lib/form/index.js @@ -21,15 +21,32 @@ export const getAsyncValidateFunction = validate => values => new Promise( ( res } ); /** - * Extract valid props to be given to an element from an object (a set of props) containing other fields. - * This function basically removes all custom props added by react-form. - * See this issue in react-form: https://github.com/erikras/redux-form/issues/1249# + * Extracts valid props to be given to a form element from an object (a set of props) containing other fields. This + * function basically removes all custom props added by redux-form: * - * @param {object} props - a set of props for an input element - * @returns {object} props filtered + * https://github.com/erikras/redux-form/issues/1249 + * + * This function should be removed once redux-form is upgraded to version 6. + * + * @param {object} props - a set of props for a form element + * @returns {object} - the props filtered */ export const removeInvalidInputProps = ( props ) => { - const { active, autofill, autofilled, dirty, error, initialValue, invalid, onUpdate, pristine, touched, - valid, visited, asyncValidating, autofocus, ...validProps } = props; + const { + active, + autofill, + autofilled, + dirty, + error, + initialValue, + invalid, + onUpdate, + pristine, + touched, + valid, + visited, + ...validProps + } = props; + return validProps; }; diff --git a/package.json b/package.json index 657a7344..2a9bc044 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "postcss-loader": "^0.8.2", "pug": "^2.0.0-alpha3", "random-words": "0.0.1", - "react": "^15.0.2", + "react": "^15.2.1", "react-addons-create-fragment": "^15.0.2", "react-addons-css-transition-group": "^15.0.2", "react-bind-handlers": "^1.0.5", @@ -98,7 +98,7 @@ "react-router-redux": "^4.0.0", "react-tap-event-plugin": "^1.0.0", "redux": "^3.3.1", - "redux-form": "^5.2.5", + "redux-form": "^5.3.1", "redux-logger": "^2.6.1", "redux-thunk": "^2.0.1", "sass-loader": "^3.2.0",