Socket
Socket
Sign inDemoInstall

formact

Package Overview
Dependencies
22
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

4

lib/FormMe.js

@@ -110,3 +110,3 @@ 'use strict';

return errors < 0;
}, _this.onSubmit = function () {
}, _this.onSubmit = function (event) {
var valid = _this.isValid();

@@ -122,3 +122,3 @@ _this.setState({

errors: _this.errors
});
}, event);
}

@@ -125,0 +125,0 @@ }, _temp), _possibleConstructorReturn(_this, _ret);

{
"name": "formact",
"version": "1.0.1",
"version": "1.0.2",
"description": "A React Context for Form Components",

@@ -63,2 +63,3 @@ "main": "lib/index.js",

"dependencies": {
"formact": "^1.0.1",
"hoist-non-react-statics": "^2.2.1",

@@ -65,0 +66,0 @@ "lodash": "^4.17.4"

@@ -17,3 +17,3 @@ // @flow

type Props = {
onSubmit: (payload: FormSubmitPayload) => void,
onSubmit: (payload: FormSubmitPayload, event: any) => void,
onChange?: (payload: FormChangePayload) => void,

@@ -127,3 +127,3 @@ component?: ?any,

onSubmit = () => {
onSubmit = (event: any) => {
const valid = this.isValid()

@@ -135,7 +135,10 @@ this.setState({

if (this.props.onSubmit) {
this.props.onSubmit({
valid,
fields: this.fields,
errors: this.errors,
})
this.props.onSubmit(
{
valid,
fields: this.fields,
errors: this.errors,
},
event,
)
}

@@ -142,0 +145,0 @@ }

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc