Navigation Menu

Skip to content

Commit

Permalink
bump version add @methyl as contributor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ola Holmström committed Feb 11, 2017
1 parent 5bfbf48 commit 24555ab
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
### 3.15.0 (2017-02-12)

* Add `onValidationReject`.

### 3.14.1 (2017-02-11)

* Update README and fix examples.
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Expand Up @@ -29,3 +29,4 @@
* Alex Belozerov (@abelozerov)
* Jake (@jakech)
* Nicole Cua (@ncua)
* Lucjan Suski (@methyl)
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -4,7 +4,7 @@
"react-tagsinput.js",
"react-tagsinput.css"
],
"version": "3.14.3",
"version": "3.15.0",
"homepage": "https://github.com/olahol/react-tagsinput",
"description": "Highly customizable React component for inputing tags",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions example/bundle.js
Expand Up @@ -4698,6 +4698,7 @@
var _props = this.props,
validationRegex = _props.validationRegex,
onChange = _props.onChange,
onValidationReject = _props.onValidationReject,
onlyUnique = _props.onlyUnique,
maxTags = _props.maxTags,
value = _props.value;
Expand All @@ -4712,6 +4713,9 @@
});
}

var rejectedTags = tags.filter(function (tag) {
return !validationRegex.test(_this2._getTagDisplayValue(tag));
});
tags = tags.filter(function (tag) {
return validationRegex.test(_this2._getTagDisplayValue(tag));
});
Expand All @@ -4729,6 +4733,10 @@
tags = tags.slice(0, remainingLimit);
}

if (onValidationReject && rejectedTags.length > 0) {
onValidationReject(rejectedTags);
}

if (tags.length > 0) {
var newValue = value.concat(tags);
var indexes = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-tagsinput",
"version": "3.14.3",
"version": "3.15.0",
"description": "Highly customizable React component for inputing tags",
"main": "react-tagsinput.js",
"peerDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions react-tagsinput.js
Expand Up @@ -276,6 +276,7 @@
var _props = this.props,
validationRegex = _props.validationRegex,
onChange = _props.onChange,
onValidationReject = _props.onValidationReject,
onlyUnique = _props.onlyUnique,
maxTags = _props.maxTags,
value = _props.value;
Expand All @@ -290,6 +291,9 @@
});
}

var rejectedTags = tags.filter(function (tag) {
return !validationRegex.test(_this2._getTagDisplayValue(tag));
});
tags = tags.filter(function (tag) {
return validationRegex.test(_this2._getTagDisplayValue(tag));
});
Expand All @@ -307,6 +311,10 @@
tags = tags.slice(0, remainingLimit);
}

if (onValidationReject && rejectedTags.length > 0) {
onValidationReject(rejectedTags);
}

if (tags.length > 0) {
var newValue = value.concat(tags);
var indexes = [];
Expand Down

0 comments on commit 24555ab

Please sign in to comment.