react-ui-validations
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.8.2](https://github.com/skbkontur/retail-ui/tree/master/packages/react-ui-validations/compare/react-ui-validations@1.8.1...react-ui-validations@1.8.2) (2022-04-25) | ||
### Bug Fixes | ||
* **validations:** add focus on submit for fields with warning ([#2804](https://github.com/skbkontur/retail-ui/tree/master/packages/react-ui-validations/issues/2804)) ([5b7d468](https://github.com/skbkontur/retail-ui/tree/master/packages/react-ui-validations/commit/5b7d468989f358ad65e9cb484fe3243c5752d333)) | ||
## [1.8.1](https://github.com/skbkontur/retail-ui/tree/master/packages/react-ui-validations/compare/react-ui-validations@1.8.0...react-ui-validations@1.8.1) (2022-03-18) | ||
@@ -8,0 +19,0 @@ |
@@ -104,2 +104,3 @@ // Generated by dts-bundle v0.7.3 | ||
hasError(): boolean; | ||
hasWarning(): boolean; | ||
isIndependent(): boolean; | ||
@@ -106,0 +107,0 @@ } |
@@ -297,3 +297,3 @@ 'use strict'; | ||
_a.sent(); | ||
firstInvalid = this.getChildWrappersSortedByPosition().find(function (x) { return x.hasError(); }); | ||
firstInvalid = this.getChildWrappersSortedByPosition().find(function (x) { return x.hasError() || x.hasWarning(); }); | ||
if (firstInvalid) { | ||
@@ -703,2 +703,5 @@ if (!withoutFocus) { | ||
}; | ||
ValidationWrapperInternal.prototype.hasWarning = function () { | ||
return getLevel(this.state.validation) === 'warning'; | ||
}; | ||
ValidationWrapperInternal.prototype.isIndependent = function () { | ||
@@ -705,0 +708,0 @@ return getIndependent(this.state.validation || this.props.validation) === true; |
{ | ||
"name": "react-ui-validations", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "Validations for @skbkontur/react-ui", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
Sorry, the diff of this file is not supported yet
143702
1188