availity-reactstrap-validation
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -0,1 +1,11 @@ | ||
<a name="2.5.0"></a> | ||
# [2.5.0](https://github.com/Availity/availity-reactstrap-validation/compare/v2.4.0...v2.5.0) (2018-12-28) | ||
### Features | ||
* **AvInput:** support multiple tags ([#110](https://github.com/Availity/availity-reactstrap-validation/issues/110)) ([e86a2ad](https://github.com/Availity/availity-reactstrap-validation/commit/e86a2ad)) | ||
<a name="2.4.0"></a> | ||
@@ -2,0 +12,0 @@ # [2.4.0](https://github.com/Availity/availity-reactstrap-validation/compare/v2.3.3...v2.4.0) (2018-12-21) |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -147,3 +147,3 @@ 'use strict'; | ||
if ((check || attributes.type === 'radio') && attributes.tag === _reactstrap.CustomInput) { | ||
if ((check || attributes.type === "radio") && (attributes.tag === _reactstrap.CustomInput || Array.isArray(attributes.tag) && attributes.tag[0] === _reactstrap.CustomInput)) { | ||
return _react2.default.createElement( | ||
@@ -150,0 +150,0 @@ _AvGroup2.default, |
@@ -72,3 +72,3 @@ 'use strict'; | ||
className = _props.className, | ||
Tag = _props.tag, | ||
tag = _props.tag, | ||
getRef = _props.getRef, | ||
@@ -82,3 +82,14 @@ _props$id = _props.id, | ||
var hasError = this.context.FormCtrl.hasError(this.props.name); | ||
var Tag = tag; | ||
if (Array.isArray(tag)) { | ||
Tag = tag[0]; | ||
tags = tag.slice(1); | ||
attributes.tag = tags; | ||
if (attributes.tag.length <= 1) { | ||
attributes.tag = attributes.tag[0]; | ||
} | ||
} | ||
var classes = (0, _classnames2.default)(className, touched ? 'is-touched' : 'is-untouched', this.context.FormCtrl.isDirty(this.props.name) ? 'is-dirty' : 'is-pristine', this.context.FormCtrl.isBad(this.props.name) ? 'is-bad-input' : null, hasError ? 'av-invalid' : 'av-valid', touched && hasError && 'is-invalid', attributes.type === 'checkbox' && touched && hasError && 'was-validated'); | ||
@@ -85,0 +96,0 @@ |
{ | ||
"name": "availity-reactstrap-validation", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"author": "Evan Sharp <evan.sharp@availity.com>", | ||
@@ -91,3 +91,3 @@ "description": "Form validation helpers for reactstrap", | ||
"copy-webpack-plugin": "^3.0.1", | ||
"coveralls": "^2.11.9", | ||
"coveralls": "^3.0.0", | ||
"cross-env": "^5.2.0", | ||
@@ -104,6 +104,6 @@ "css-loader": "^0.28.0", | ||
"history": "^2.0.0", | ||
"jsdom": "^9.4.2", | ||
"jsdom": "^13.1.0", | ||
"json-loader": "^0.5.4", | ||
"lodash.debounce": "^4.0.8", | ||
"mocha": "^3.0.2", | ||
"mocha": "^5.2.0", | ||
"mocha-webpack": "^0.6.0", | ||
@@ -143,3 +143,8 @@ "nyc": "^8.1.0", | ||
"report-dir": "./__test__/coverage" | ||
}, | ||
"prettier": { | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} | ||
} |
@@ -53,3 +53,3 @@ [![Build Status](https://travis-ci.org/Availity/availity-reactstrap-validation.svg?branch=master)](https://travis-ci.org/Availity/availity-reactstrap-validation) [![Coverage Status](https://coveralls.io/repos/github/Availity/availity-reactstrap-validation/badge.svg?branch=master)](https://coveralls.io/github/Availity/availity-reactstrap-validation?branch=master) | ||
```sh | ||
npm test:coverage | ||
npm run test:coverage | ||
``` | ||
@@ -56,0 +56,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37336
6488141