Socket
Socket
Sign inDemoInstall

react-final-form

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-final-form - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

4

dist/index.d.ts

@@ -27,7 +27,7 @@ import * as React from 'react'

dirty: boolean
error: boolean
error: any
initial: boolean
invalid: boolean
pristine: boolean
submitError: boolean
submitError: any
submitFailed: boolean

@@ -34,0 +34,0 @@ submitSucceeded: boolean

@@ -339,14 +339,12 @@ 'use strict';

var input = _extends({ name: name, value: value }, this.handlers);
if (component === 'input') {
if (rest.type === 'checkbox') {
if (_value === undefined) {
input.checked = !!value;
} else {
input.checked = Array.isArray(value) && ~value.indexOf(_value);
input.value = _value;
}
} else if (rest.type === 'radio') {
input.checked = value === _value;
if (rest.type === 'checkbox') {
if (_value === undefined) {
input.checked = !!value;
} else {
input.checked = Array.isArray(value) && ~value.indexOf(_value);
input.value = _value;
}
} else if (rest.type === 'radio') {
input.checked = value === _value;
input.value = _value;
}

@@ -623,3 +621,3 @@ if (component === 'select' && rest.multiple) {

//
var version$1 = '3.0.1';
var version$1 = '3.0.3';

@@ -626,0 +624,0 @@ exports.version = version$1;

@@ -333,14 +333,12 @@ import { PureComponent, createElement } from 'react';

var input = _extends({ name: name, value: value }, this.handlers);
if (component === 'input') {
if (rest.type === 'checkbox') {
if (_value === undefined) {
input.checked = !!value;
} else {
input.checked = Array.isArray(value) && ~value.indexOf(_value);
input.value = _value;
}
} else if (rest.type === 'radio') {
input.checked = value === _value;
if (rest.type === 'checkbox') {
if (_value === undefined) {
input.checked = !!value;
} else {
input.checked = Array.isArray(value) && ~value.indexOf(_value);
input.value = _value;
}
} else if (rest.type === 'radio') {
input.checked = value === _value;
input.value = _value;
}

@@ -617,4 +615,4 @@ if (component === 'select' && rest.multiple) {

//
var version$1 = '3.0.1';
var version$1 = '3.0.3';
export { version$1 as version, Field, ReactFinalForm as Form, FormSpy };

@@ -336,14 +336,12 @@ (function (global, factory) {

var input = _extends({ name: name, value: value }, this.handlers);
if (component === 'input') {
if (rest.type === 'checkbox') {
if (_value === undefined) {
input.checked = !!value;
} else {
input.checked = Array.isArray(value) && ~value.indexOf(_value);
input.value = _value;
}
} else if (rest.type === 'radio') {
input.checked = value === _value;
if (rest.type === 'checkbox') {
if (_value === undefined) {
input.checked = !!value;
} else {
input.checked = Array.isArray(value) && ~value.indexOf(_value);
input.value = _value;
}
} else if (rest.type === 'radio') {
input.checked = value === _value;
input.value = _value;
}

@@ -620,3 +618,3 @@ if (component === 'select' && rest.multiple) {

//
var version$1 = '3.0.1';
var version$1 = '3.0.3';

@@ -623,0 +621,0 @@ exports.version = version$1;

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","final-form"],e):e(t["react-final-form"]={},t.React,t.PropTypes,t.FinalForm)}(this,function(t,e,n,r){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var i=function(t,e){};function o(t,e,n){return t?!e||n.some(function(n){return t[n]!==e[n]}):!!e}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},f=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},p=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e};function m(t,n){var r=t.render,i=t.children,o=t.component,a=f(t,["render","children","component"]);return o?e.createElement(o,c({},a,{children:i,render:r})):r?r(c({},a,{children:i})):"function"!=typeof i?null:i(a)}var b="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,h=function(t,e,n,r){if(!r&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(r&&t.nativeEvent)return t.nativeEvent.text;var i=t.target,o=i.type,a=i.value,u=i.checked;switch(o){case"checkbox":if(void 0!==n){if(u)return Array.isArray(e)?e.concat(n):[n];if(!Array.isArray(e))return e;var s=e.indexOf(n);return s<0?e:e.slice(0,s).concat(e.slice(s+1))}return!!u;case"select-multiple":return function(t){var e=[];if(t)for(var n=0;n<t.length;n++){var r=t[n];r.selected&&e.push(r.value)}return e}(t.target.options);default:return a}},v=r.fieldSubscriptionItems.reduce(function(t,e){return t[e]=!0,t},{}),d=function(t){function n(t,e){u(this,n);var r=p(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));r.subscribe=function(t,e){var n=t.isEqual,i=t.name,o=t.subscription,a=t.validateFields;r.unsubscribe=r.context.reactFinalForm.registerField(i,e,o||v,{isEqual:n,getValidator:function(){return r.props.validate},validateFields:a})},r.notify=function(t){return r.setState({state:t})},r.handlers={onBlur:function(t){r.state.state.blur()},onChange:function(t){var e=r.props,n=e.parse,i=e.value,o=t&&t.target?h(t,r.state.state.value,i,b):t;r.state.state.change(null!==n?n(o,r.props.name):o)},onFocus:function(t){r.state.state.focus()}};var o=void 0;return i(e.reactFinalForm,"Field must be used inside of a ReactFinalForm component"),r.context.reactFinalForm&&r.subscribe(t,function(t){o?r.notify(t):o=t}),r.state={state:o||{}},r}return l(n,t),s(n,[{key:"componentWillReceiveProps",value:function(t){var e=t.name,n=t.subscription;(this.props.name!==e||o(this.props.subscription,n,r.fieldSubscriptionItems))&&this.context.reactFinalForm&&(this.unsubscribe(),this.subscribe(t,this.notify))}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var t=this.props,n=t.allowNull,r=t.component,i=t.children,o=t.format,a=(t.parse,t.isEqual,t.name),u=(t.subscription,t.validate,t.validateFields,t.value),s=f(t,["allowNull","component","children","format","parse","isEqual","name","subscription","validate","validateFields","value"]),l=this.state.state,p=(l.blur,l.change,l.focus,l.value),b=(l.name,f(l,["blur","change","focus","value","name"]));null!==o&&(p=o(p,a)),null!==p||n||(p="");var h=c({name:a,value:p},this.handlers);return"input"===r&&("checkbox"===s.type?void 0===u?h.checked=!!p:(h.checked=Array.isArray(p)&&~p.indexOf(u),h.value=u):"radio"===s.type&&(h.checked=p===u,h.value=u)),"select"===r&&s.multiple&&(h.value=h.value||[]),"function"==typeof i?i(c({input:h,meta:b},s)):"string"==typeof r?e.createElement(r,c({},h,{children:i},s)):m(c({input:h,meta:b,children:i,component:r},s))}}]),n}(e.PureComponent);d.contextTypes={reactFinalForm:n.object},d.defaultProps={format:function(t,e){return void 0===t?"":t},parse:function(t,e){return""===t?void 0:t}};var y={"final-form":r.version,"react-final-form":w},F=r.formSubscriptionItems.reduce(function(t,e){return t[e]=!0,t},{}),g=function(t){function e(t){u(this,e);var n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));n.notify=function(t){return n.setState({state:t})},n.handleSubmit=function(t){return t&&t.preventDefault(),n.form.submit()};t.children,t.component;var o=t.debug,a=t.decorators,s=t.initialValues,c=t.mutators,l=t.onSubmit,f=(t.render,t.subscription),m={debug:o,initialValues:s,mutators:c,onSubmit:l,validate:t.validate,validateOnBlur:t.validateOnBlur};try{n.form=r.createForm(m)}catch(t){i(!1,t.message)}var b=void 0;return n.unsubscriptions=[],n.form&&n.unsubscriptions.push(n.form.subscribe(function(t){b?n.notify(t):b=t},f||F)),n.state={state:b},a&&a.forEach(function(t){n.unsubscriptions.push(t(n.form))}),n}return l(e,t),s(e,[{key:"getChildContext",value:function(){return{reactFinalForm:this.form}}},{key:"componentWillReceiveProps",value:function(t){(function(t,e){if(t===e)return!0;if("object"!==(void 0===t?"undefined":a(t))||!t||"object"!==(void 0===e?"undefined":a(e))||!e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(e),o=0;o<n.length;o++){var u=n[o];if(!i(u)||t[u]!==e[u])return!1}return!0})(this.props.initialValues,t.initialValues)||this.form.initialize(t.initialValues)}},{key:"componentWillUnmount",value:function(){this.unsubscriptions.forEach(function(t){return t()})}},{key:"render",value:function(){var t=this.props,e=(t.debug,t.initialValues,t.mutators,t.onSubmit,t.subscription,t.validate,t.validateOnBlur,f(t,["debug","initialValues","mutators","onSubmit","subscription","validate","validateOnBlur"]));return m(c({},e,this.state.state,{mutators:this.form&&this.form.mutators,batch:this.form&&this.form.batch,blur:this.form&&this.form.blur,change:this.form&&this.form.change,focus:this.form&&this.form.focus,handleSubmit:this.handleSubmit,initialize:this.form&&this.form.initialize,reset:this.form&&this.form.reset,__versions:y}))}}]),e}(e.PureComponent);g.childContextTypes={reactFinalForm:n.object},g.displayName="ReactFinalForm("+r.version+")("+w+")";var O=function(t){function e(t,n){u(this,e);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));r.subscribe=function(t,e){var n=t.subscription;r.unsubscribe=r.context.reactFinalForm.subscribe(e,n||F)},r.notify=function(t){r.setState({state:t}),r.props.onChange&&r.props.onChange(t)};var o=void 0;return i(n.reactFinalForm,"FormSpy must be used inside of a ReactFinalForm component"),r.context.reactFinalForm&&r.subscribe(t,function(e){o?r.notify(e):(o=e,t.onChange&&t.onChange(e))}),r.state={state:o},r}return l(e,t),s(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.subscription;o(this.props.subscription,e,r.formSubscriptionItems)&&this.context.reactFinalForm&&(this.unsubscribe(),this.subscribe(t,this.notify))}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var t=this.props,e=t.onChange,n=(t.subscription,f(t,["onChange","subscription"])),r=this.context.reactFinalForm;return e?null:m(c({},n,this.state.state,{mutators:r&&r.mutators,batch:r&&r.batch,blur:r&&r.blur,change:r&&r.change,focus:r&&r.focus,initialize:r&&r.initialize,reset:r&&r.reset}))}}]),e}(e.PureComponent);O.contextTypes={reactFinalForm:n.object};var w="3.0.1";t.version=w,t.Field=d,t.Form=g,t.FormSpy=O,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("prop-types"),require("final-form")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","final-form"],e):e(t["react-final-form"]={},t.React,t.PropTypes,t.FinalForm)}(this,function(t,e,n,r){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var i=function(t,e){};function o(t,e,n){return t?!e||n.some(function(n){return t[n]!==e[n]}):!!e}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},f=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},p=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e};function m(t,n){var r=t.render,i=t.children,o=t.component,a=f(t,["render","children","component"]);return o?e.createElement(o,c({},a,{children:i,render:r})):r?r(c({},a,{children:i})):"function"!=typeof i?null:i(a)}var b="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,h=function(t,e,n,r){if(!r&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(r&&t.nativeEvent)return t.nativeEvent.text;var i=t.target,o=i.type,a=i.value,u=i.checked;switch(o){case"checkbox":if(void 0!==n){if(u)return Array.isArray(e)?e.concat(n):[n];if(!Array.isArray(e))return e;var s=e.indexOf(n);return s<0?e:e.slice(0,s).concat(e.slice(s+1))}return!!u;case"select-multiple":return function(t){var e=[];if(t)for(var n=0;n<t.length;n++){var r=t[n];r.selected&&e.push(r.value)}return e}(t.target.options);default:return a}},v=r.fieldSubscriptionItems.reduce(function(t,e){return t[e]=!0,t},{}),d=function(t){function n(t,e){u(this,n);var r=p(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));r.subscribe=function(t,e){var n=t.isEqual,i=t.name,o=t.subscription,a=t.validateFields;r.unsubscribe=r.context.reactFinalForm.registerField(i,e,o||v,{isEqual:n,getValidator:function(){return r.props.validate},validateFields:a})},r.notify=function(t){return r.setState({state:t})},r.handlers={onBlur:function(t){r.state.state.blur()},onChange:function(t){var e=r.props,n=e.parse,i=e.value,o=t&&t.target?h(t,r.state.state.value,i,b):t;r.state.state.change(null!==n?n(o,r.props.name):o)},onFocus:function(t){r.state.state.focus()}};var o=void 0;return i(e.reactFinalForm,"Field must be used inside of a ReactFinalForm component"),r.context.reactFinalForm&&r.subscribe(t,function(t){o?r.notify(t):o=t}),r.state={state:o||{}},r}return l(n,t),s(n,[{key:"componentWillReceiveProps",value:function(t){var e=t.name,n=t.subscription;(this.props.name!==e||o(this.props.subscription,n,r.fieldSubscriptionItems))&&this.context.reactFinalForm&&(this.unsubscribe(),this.subscribe(t,this.notify))}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var t=this.props,n=t.allowNull,r=t.component,i=t.children,o=t.format,a=(t.parse,t.isEqual,t.name),u=(t.subscription,t.validate,t.validateFields,t.value),s=f(t,["allowNull","component","children","format","parse","isEqual","name","subscription","validate","validateFields","value"]),l=this.state.state,p=(l.blur,l.change,l.focus,l.value),b=(l.name,f(l,["blur","change","focus","value","name"]));null!==o&&(p=o(p,a)),null!==p||n||(p="");var h=c({name:a,value:p},this.handlers);return"checkbox"===s.type?void 0===u?h.checked=!!p:(h.checked=Array.isArray(p)&&~p.indexOf(u),h.value=u):"radio"===s.type&&(h.checked=p===u,h.value=u),"select"===r&&s.multiple&&(h.value=h.value||[]),"function"==typeof i?i(c({input:h,meta:b},s)):"string"==typeof r?e.createElement(r,c({},h,{children:i},s)):m(c({input:h,meta:b,children:i,component:r},s))}}]),n}(e.PureComponent);d.contextTypes={reactFinalForm:n.object},d.defaultProps={format:function(t,e){return void 0===t?"":t},parse:function(t,e){return""===t?void 0:t}};var y={"final-form":r.version,"react-final-form":w},F=r.formSubscriptionItems.reduce(function(t,e){return t[e]=!0,t},{}),g=function(t){function e(t){u(this,e);var n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));n.notify=function(t){return n.setState({state:t})},n.handleSubmit=function(t){return t&&t.preventDefault(),n.form.submit()};t.children,t.component;var o=t.debug,a=t.decorators,s=t.initialValues,c=t.mutators,l=t.onSubmit,f=(t.render,t.subscription),m={debug:o,initialValues:s,mutators:c,onSubmit:l,validate:t.validate,validateOnBlur:t.validateOnBlur};try{n.form=r.createForm(m)}catch(t){i(!1,t.message)}var b=void 0;return n.unsubscriptions=[],n.form&&n.unsubscriptions.push(n.form.subscribe(function(t){b?n.notify(t):b=t},f||F)),n.state={state:b},a&&a.forEach(function(t){n.unsubscriptions.push(t(n.form))}),n}return l(e,t),s(e,[{key:"getChildContext",value:function(){return{reactFinalForm:this.form}}},{key:"componentWillReceiveProps",value:function(t){(function(t,e){if(t===e)return!0;if("object"!==(void 0===t?"undefined":a(t))||!t||"object"!==(void 0===e?"undefined":a(e))||!e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(e),o=0;o<n.length;o++){var u=n[o];if(!i(u)||t[u]!==e[u])return!1}return!0})(this.props.initialValues,t.initialValues)||this.form.initialize(t.initialValues)}},{key:"componentWillUnmount",value:function(){this.unsubscriptions.forEach(function(t){return t()})}},{key:"render",value:function(){var t=this.props,e=(t.debug,t.initialValues,t.mutators,t.onSubmit,t.subscription,t.validate,t.validateOnBlur,f(t,["debug","initialValues","mutators","onSubmit","subscription","validate","validateOnBlur"]));return m(c({},e,this.state.state,{mutators:this.form&&this.form.mutators,batch:this.form&&this.form.batch,blur:this.form&&this.form.blur,change:this.form&&this.form.change,focus:this.form&&this.form.focus,handleSubmit:this.handleSubmit,initialize:this.form&&this.form.initialize,reset:this.form&&this.form.reset,__versions:y}))}}]),e}(e.PureComponent);g.childContextTypes={reactFinalForm:n.object},g.displayName="ReactFinalForm("+r.version+")("+w+")";var O=function(t){function e(t,n){u(this,e);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));r.subscribe=function(t,e){var n=t.subscription;r.unsubscribe=r.context.reactFinalForm.subscribe(e,n||F)},r.notify=function(t){r.setState({state:t}),r.props.onChange&&r.props.onChange(t)};var o=void 0;return i(n.reactFinalForm,"FormSpy must be used inside of a ReactFinalForm component"),r.context.reactFinalForm&&r.subscribe(t,function(e){o?r.notify(e):(o=e,t.onChange&&t.onChange(e))}),r.state={state:o},r}return l(e,t),s(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.subscription;o(this.props.subscription,e,r.formSubscriptionItems)&&this.context.reactFinalForm&&(this.unsubscribe(),this.subscribe(t,this.notify))}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var t=this.props,e=t.onChange,n=(t.subscription,f(t,["onChange","subscription"])),r=this.context.reactFinalForm;return e?null:m(c({},n,this.state.state,{mutators:r&&r.mutators,batch:r&&r.batch,blur:r&&r.blur,change:r&&r.change,focus:r&&r.focus,initialize:r&&r.initialize,reset:r&&r.reset}))}}]),e}(e.PureComponent);O.contextTypes={reactFinalForm:n.object};var w="3.0.3";t.version=w,t.Field=d,t.Form=g,t.FormSpy=O,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=react-final-form.umd.min.js.map
{
"name": "react-final-form",
"version": "3.0.2",
"description":
"🏁 High performance subscription-based form state management for React",
"version": "3.0.3",
"description": "🏁 High performance subscription-based form state management for React",
"main": "dist/react-final-form.cjs.js",

@@ -10,3 +9,5 @@ "jsnext:main": "dist/react-final-form.es.js",

"typings": "dist/index.d.ts",
"files": ["dist"],
"files": [
"dist"
],
"scripts": {

@@ -17,4 +18,3 @@ "start": "nps",

},
"author":
"Erik Rasmussen <rasmussenerik@gmail.com> (http://github.com/erikras)",
"author": "Erik Rasmussen <rasmussenerik@gmail.com> (http://github.com/erikras)",
"license": "MIT",

@@ -32,3 +32,3 @@ "repository": {

"babel-eslint": "^8.0.3",
"babel-jest": "^22.0.0",
"babel-jest": "^22.1.0",
"babel-plugin-external-helpers": "^6.22.0",

@@ -42,3 +42,3 @@ "babel-plugin-transform-flow-strip-types": "^6.22.0",

"eslint": "^4.12.1",
"eslint-config-react-app": "^2.0.1",
"eslint-config-react-app": "^2.1.0",
"eslint-plugin-babel": "^4.1.2",

@@ -49,7 +49,6 @@ "eslint-plugin-flowtype": "^2.37.0",

"eslint-plugin-react": "^7.4.0",
"final-form": "^4.0.0",
"flow": "^0.2.3",
"flow-bin": "^0.61.0",
"final-form": "^4.0.1",
"flow-bin": "^0.63.1",
"husky": "^0.14.3",
"jest": "^22.0.0",
"jest": "^22.1.2",
"lint-staged": "^6.0.0",

@@ -64,3 +63,3 @@ "nps": "^5.7.1",

"react-dom": "^16.2.0",
"rollup": "^0.52.0",
"rollup": "^0.54.1",
"rollup-plugin-babel": "^3.0.2",

@@ -79,6 +78,11 @@ "rollup-plugin-commonjs": "^8.2.6",

"jest": {
"setupFiles": ["raf/polyfill"]
"setupFiles": [
"raf/polyfill"
]
},
"lint-staged": {
"*.{js*,ts,json,md,css}": ["prettier --write", "git add"]
"*.{js*,ts,json,md,css}": [
"prettier --write",
"git add"
]
},

@@ -85,0 +89,0 @@ "bundlesize": [

@@ -130,2 +130,3 @@ # 🏁 React Final Form

* [Auto-Save on Field Blur](#auto-save-on-field-blur)
* [Custom Validation Engine](#custom-validation-engine)
* [Rendering](#rendering)

@@ -313,2 +314,6 @@ * [API](#api)

### [Custom Validation Engine](https://codesandbox.io/s/kxxw4l0p9o)
Demonstrates how incredibly extensible `FormSpy`, the [`setFieldData` mutator](https://github.com/final-form/final-form-set-field-data), and render props are by implementing a custom validation engine completely apart from the built-in validation in 🏁 Final Form, thus allowing for special behaviors, like only validating a single field when that field is blurred.
## Rendering

@@ -369,3 +374,3 @@

#### `component?: React.ComponentType<FieldRenderProps>`
#### `component?: React.ComponentType<FieldRenderProps> | string`

@@ -372,0 +377,0 @@ A component that is given [`FieldRenderProps`](#fieldrenderprops) as props, as

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc