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

easy-react-form

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-react-form - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

31

commonjs/field.js

@@ -173,2 +173,9 @@ 'use strict';

}
}, {
key: 'getNode',
value: function getNode() {
if (this.field.current) {
return _reactDom2.default.findDOMNode(this.field.current);
}
}

@@ -280,2 +287,4 @@ // Focuses on a field (can be called externally through a ref).

this.focus = function () {
// `.focus()` could theoretically maybe potentially be called in a timeout,
// so check if the component is still mounted.
if (!_this2.mounted) {

@@ -294,9 +303,23 @@ return;

// Generic DOM focusing.
_reactDom2.default.findDOMNode(_this2.field.current).focus();
var node = _this2.getNode();
if (node) {
node.focus();
} else {
console.error('Couldn\'t focus on field "' + _this2.props.name + '": DOM Node not found. ' + STATELESS_COMPONENT_HINT);
}
};
this.scroll = function () {
if (_this2.mounted) {
(0, _utility.scrollTo)(_reactDom2.default.findDOMNode(_this2.field.current));
// `.scroll()` could theoretically maybe potentially be called in a timeout,
// so check if the component is still mounted.
if (!_this2.mounted) {
return;
}
var node = _this2.getNode();
if (node) {
(0, _utility.scrollTo)(node);
} else {
console.error('Couldn\'t scroll to field "' + _this2.props.name + '": DOM Node not found. ' + STATELESS_COMPONENT_HINT);
}
};

@@ -328,2 +351,4 @@

}
var STATELESS_COMPONENT_HINT = 'For example, if it\'s a "stateless" component then rewrite it as a "React.Component" having a ".focus()" method.';
//# sourceMappingURL=field.js.map

@@ -173,2 +173,9 @@ 'use strict';

}
}, {
key: 'getNode',
value: function getNode() {
if (this.field.current) {
return _reactDom2.default.findDOMNode(this.field.current);
}
}

@@ -280,2 +287,4 @@ // Focuses on a field (can be called externally through a ref).

this.focus = function () {
// `.focus()` could theoretically maybe potentially be called in a timeout,
// so check if the component is still mounted.
if (!_this2.mounted) {

@@ -294,9 +303,23 @@ return;

// Generic DOM focusing.
_reactDom2.default.findDOMNode(_this2.field.current).focus();
var node = _this2.getNode();
if (node) {
node.focus();
} else {
console.error('Couldn\'t focus on field "' + _this2.props.name + '": DOM Node not found. ' + STATELESS_COMPONENT_HINT);
}
};
this.scroll = function () {
if (_this2.mounted) {
(0, _utility.scrollTo)(_reactDom2.default.findDOMNode(_this2.field.current));
// `.scroll()` could theoretically maybe potentially be called in a timeout,
// so check if the component is still mounted.
if (!_this2.mounted) {
return;
}
var node = _this2.getNode();
if (node) {
(0, _utility.scrollTo)(node);
} else {
console.error('Couldn\'t scroll to field "' + _this2.props.name + '": DOM Node not found. ' + STATELESS_COMPONENT_HINT);
}
};

@@ -328,2 +351,4 @@

}
var STATELESS_COMPONENT_HINT = 'For example, if it\'s a "stateless" component then rewrite it as a "React.Component" having a ".focus()" method.';
//# sourceMappingURL=field.js.map

2

package.json
{
"name": "easy-react-form",
"version": "1.0.11",
"version": "1.0.12",
"description": "Simple, fast and easy-to-use React Form.",

@@ -5,0 +5,0 @@ "main": "index.commonjs.js",

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