Comparing version 0.0.27 to 0.0.28
@@ -260,4 +260,3 @@ 'use strict'; | ||
noValidate: true, | ||
onSubmit: this.props.store.onSubmit.bind(this, onSubmit, validFormBeforePost, invalidFormBeforePost, validFormAfterPost, invalidFormAfterPost, postUrl, headers) | ||
}), | ||
onSubmit: this.props.store.onSubmit.bind(this, onSubmit, validFormBeforePost, invalidFormBeforePost, validFormAfterPost, invalidFormAfterPost, postUrl, headers) }), | ||
this.props.children | ||
@@ -300,4 +299,3 @@ ); | ||
className: '' + (className || '') + thisItem.className, | ||
value: thisItem.value | ||
})), | ||
value: thisItem.value })), | ||
_react2.default.createElement( | ||
@@ -346,4 +344,3 @@ 'div', | ||
className: '' + (className || '') + thisItem.className, | ||
value: thisItem.value | ||
}), | ||
value: thisItem.value }), | ||
this.props.children | ||
@@ -371,3 +368,4 @@ ), | ||
_this6.props.store.setFormItem(_this6.props); | ||
var value = _this6.props.children ? { value: _this6.props.children[0].props.value } : null; | ||
_this6.props.store.setFormItem(_extends({}, _this6.props, value)); | ||
return _this6; | ||
@@ -381,5 +379,6 @@ } | ||
store = _props4.store, | ||
validations = _props4.validations, | ||
children = _props4.children, | ||
className = _props4.className, | ||
otherProps = _objectWithoutProperties(_props4, ['store', 'children', 'className']); | ||
otherProps = _objectWithoutProperties(_props4, ['store', 'validations', 'children', 'className']); | ||
@@ -386,0 +385,0 @@ var thisItem = store.state.formItems[this.props.name]; |
{ | ||
"name": "recassfov", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "React client and server side form validation", | ||
@@ -5,0 +5,0 @@ "main": "./build/Recassfov.js", |
@@ -227,4 +227,3 @@ import React from 'react' | ||
) | ||
} | ||
> | ||
}> | ||
{this.props.children} | ||
@@ -252,4 +251,3 @@ </form> | ||
className={`${className || ''}${thisItem.className}`} | ||
value={thisItem.value} | ||
/> | ||
value={thisItem.value} /> | ||
@@ -278,4 +276,3 @@ <div className={store.state.classNames.invalidFeedback}>{thisItem.invalidFeedback}</div> | ||
className={`${className || ''}${thisItem.className}`} | ||
value={thisItem.value} | ||
> | ||
value={thisItem.value}> | ||
{this.props.children} | ||
@@ -293,7 +290,8 @@ </textarea> | ||
super(props) | ||
this.props.store.setFormItem(this.props) | ||
const value = this.props.children ? { value: this.props.children[0].props.value } : null | ||
this.props.store.setFormItem({...this.props, ...value}) | ||
} | ||
render () { | ||
const { store, children, className, ...otherProps } = this.props | ||
const { store, validations, children, className, ...otherProps } = this.props | ||
const thisItem = store.state.formItems[this.props.name] | ||
@@ -300,0 +298,0 @@ |
173946
825