calidation
Advanced tools
Comparing version 1.5.1 to 1.6.0
@@ -29,2 +29,4 @@ 'use strict'; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -166,3 +168,6 @@ | ||
value: function render() { | ||
var children = this.props.children; | ||
var _props = this.props, | ||
children = _props.children, | ||
onSubmit = _props.onSubmit, | ||
rest = _objectWithoutProperties(_props, ['children', 'onSubmit']); | ||
@@ -179,3 +184,3 @@ var formContext = { | ||
'form', | ||
{ onChange: this.onChange, onSubmit: this.onSubmit }, | ||
_extends({ onChange: this.onChange, onSubmit: this.onSubmit }, rest), | ||
_react2.default.createElement( | ||
@@ -182,0 +187,0 @@ _FormContext.FormProvider, |
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _react = require('react'); | ||
@@ -24,2 +26,4 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var FormValidation = function FormValidation(props) { | ||
@@ -29,8 +33,8 @@ var children = props.children, | ||
initialValues = props.initialValues, | ||
onSubmit = props.onSubmit; | ||
onSubmit = props.onSubmit, | ||
rest = _objectWithoutProperties(props, ['children', 'config', 'initialValues', 'onSubmit']); | ||
return _react2.default.createElement( | ||
_Form2.default, | ||
{ onSubmit: onSubmit }, | ||
_extends({ onSubmit: onSubmit }, rest), | ||
_react2.default.createElement( | ||
@@ -37,0 +41,0 @@ _Validation2.default, |
{ | ||
"name": "calidation", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "A red hot validation library for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
39417
410