Comparing version 0.14.0 to 0.14.1
@@ -81,13 +81,22 @@ 'use strict'; | ||
if (error) { | ||
var firstNode = undefined; | ||
var firstTop = undefined; | ||
for (var name in error) { | ||
if (error.hasOwnProperty(name) && error[name].instance) { | ||
var node = _reactDom2.default.findDOMNode(error[name].instance); | ||
var c = options.container || getScrollableContainer(node); | ||
(0, _domScrollIntoView2.default)(node, c, { | ||
onlyScrollIfNeeded: true | ||
}); | ||
break; | ||
var top = node.getBoundingClientRect().top; | ||
if (firstTop === undefined || firstTop > top) { | ||
firstTop = top; | ||
firstNode = node; | ||
} | ||
} | ||
} | ||
if (firstNode) { | ||
var c = options.container || getScrollableContainer(firstNode); | ||
(0, _domScrollIntoView2.default)(firstNode, c, { | ||
onlyScrollIfNeeded: true | ||
}); | ||
} | ||
} | ||
if (typeof callback === 'function') { | ||
@@ -94,0 +103,0 @@ callback(error, values); |
{ | ||
"name": "rc-form", | ||
"version": "0.14.0", | ||
"version": "0.14.1", | ||
"description": "React High Order Form Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
259341
4902