Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

formik

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formik - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

1

es6/index.d.ts

@@ -32,2 +32,3 @@ /// <reference types="react" />

onChange: (e: React.ChangeEvent<any>) => void;
onBlur: (e: any) => void;
onChangeValue: (name: string, value: any) => void;

@@ -34,0 +35,0 @@ setError: (e: any) => void;

20

es6/index.js

@@ -63,9 +63,11 @@ import * as tslib_1 from "tslib";

: value;
// Set changed fields as touched
setTouched(tslib_1.__assign({}, touched, (_b = {}, _b[name] = true, _b)));
// Set form fields by name
setValues(tslib_1.__assign({}, values, (_c = {}, _c[name] = val, _c)));
setValues(tslib_1.__assign({}, values, (_b = {}, _b[name] = val, _b)));
// Validate against schema
validateFormData(tslib_1.__assign({}, values, (_d = {}, _d[name] = val, _d)), validationSchema, setErrors);
var _b, _c, _d;
validateFormData(tslib_1.__assign({}, values, (_c = {}, _c[name] = val, _c)), validationSchema, setErrors);
var _b, _c;
}, onBlur: function (e) {
e.persist();
setTouched(tslib_1.__assign({}, values, (_a = {}, _a[e.target.name] = true, _a)));
var _a;
}, onChangeValue: function (name, value) {

@@ -99,2 +101,6 @@ // Set changed fields as touched

}, resetForm: function (nextProps) {
setSubmitting(false);
setErrors({});
setTouched({});
setError(undefined);
if (nextProps) {

@@ -107,2 +113,6 @@ setValues(mapPropsToValues(nextProps));

}, onReset: function () {
setSubmitting(false);
setErrors({});
setTouched({});
setError(undefined);
setValues(mapPropsToValues(rest));

@@ -109,0 +119,0 @@ }, setValues: setValues,

@@ -32,2 +32,3 @@ /// <reference types="react" />

onChange: (e: React.ChangeEvent<any>) => void;
onBlur: (e: any) => void;
onChangeValue: (name: string, value: any) => void;

@@ -34,0 +35,0 @@ setError: (e: any) => void;

{
"name": "formik",
"description": "An elegant way to handle forms in React",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "author": "Jared Palmer <jared@palmer.net>",

@@ -32,2 +32,3 @@ /// <reference types="react" />

onChange: (e: React.ChangeEvent<any>) => void;
onBlur: (e: any) => void;
onChangeValue: (name: string, value: any) => void;

@@ -34,0 +35,0 @@ setError: (e: any) => void;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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