Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Form.create = function (options) {
var formWrapper = createDOMForm(_extends({ fieldNameProp: 'id' }, options, { fieldMetaProp: FIELD_META_PROP }));
/* eslint-disable react/prefer-es6-class */
return function (Component) {
return formWrapper(createReactClass({
propTypes: {
form: PropTypes.object.isRequired
},
childContextTypes: {
form: PropTypes.object.isRequired
},
getChildContext: function getChildContext() {
return {
form: this.props.form
};
},
componentWillMount: function componentWillMount() {
this.__getFieldProps = this.props.form.getFieldProps;
Form.create = function () {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var formWrapper = createDOMForm(_extends({ fieldNameProp: 'id' }, options, { fieldMetaProp: FIELD_META_PROP }));
/* eslint-disable react/prefer-es6-class */
return function (Component) {
return formWrapper(createReactClass({
propTypes: {
form: PropTypes.object.isRequired
},
childContextTypes: {
form: PropTypes.object.isRequired
},
getChildContext: function getChildContext() {
return {
form: this.props.form
};
},
componentWillMount: function componentWillMount() {
this.__getFieldProps = this.props.form.getFieldProps;
Form.create = function create() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return createDOMForm(_extends(_extends({
fieldNameProp: 'id'
}, options), {
fieldMetaProp: FIELD_META_PROP,
fieldDataProp: FIELD_DATA_PROP
}));
};
//# sourceMappingURL=Form.js.map