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

form-lib

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

form-lib - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

src/createFormControl.js

24

lib/Form.js

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

*/
values: props.values || {}
values: props.defaultValues || {}
};

@@ -235,7 +235,11 @@ _this.handleFieldChange = _this.handleFieldChange.bind(_this);

value: function handleFieldChange(name, value, event) {
var _props4 = this.props,
onChange = _props4.onChange,
defaultValues = _props4.defaultValues;
var onChange = this.props.onChange;
var values = Object.assign({}, this.state.values, defaultValues, _defineProperty({}, name, value));
var values = this.getValues();
var nextValues = Object.assign({}, values, _defineProperty({}, name, value));
this.setState({
values: nextValues
});
onChange && onChange(values, event);

@@ -246,7 +250,7 @@ }

value: function render() {
var _props5 = this.props,
horizontal = _props5.horizontal,
inline = _props5.inline,
className = _props5.className,
props = _objectWithoutProperties(_props5, ['horizontal', 'inline', 'className']);
var _props4 = this.props,
horizontal = _props4.horizontal,
inline = _props4.inline,
className = _props4.className,
props = _objectWithoutProperties(_props4, ['horizontal', 'inline', 'className']);

@@ -253,0 +257,0 @@ var clesses = (0, _classnames2.default)('form', {

{
"name": "form-lib",
"version": "0.1.5",
"version": "0.1.6",
"description": "Form component for React",

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

"CHANGELOG.md",
"src",
"lib"

@@ -34,0 +35,0 @@ ],

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