Skip to content

Commit aa13ee3

Browse files
author
Brian Feister
committed
Chore (build v.0.9.5)
1 parent 41ba28f commit aa13ee3

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

dist/select.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.9.4 - 2014-12-09T22:43:18.215Z
4+
* Version: 0.9.5 - 2014-12-12T16:07:20.859Z
55
* License: MIT
66
*/
77

dist/select.js

100644100755
+13-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.9.4 - 2014-12-09T22:43:18.211Z
4+
* Version: 0.9.5 - 2014-12-12T16:07:20.856Z
55
* License: MIT
66
*/
77

@@ -411,8 +411,15 @@
411411
// ctrl.tagging pushes items to ctrl.items, so we only have empty val
412412
// for `item` if it is a detected duplicate
413413
if ( item === undefined ) return;
414-
// create new item on the fly
415-
item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : item.replace(ctrl.taggingLabel,'');
414+
415+
// create new item on the fly if we don't already have one;
416+
// use tagging function if we have one
417+
if ( ctrl.tagging.fct !== undefined && typeof item === 'string' ) {
418+
item = ctrl.tagging.fct(ctrl.search);
419+
// if item type is 'string', apply the tagging label
420+
} else if ( typeof item === 'string' ) {
421+
item = item.replace(ctrl.taggingLabel,'');
422+
}
416423
}
417424
}
418425
// search ctrl.selected for dupes potentially caused by tagging and return early if found
@@ -463,9 +470,9 @@
463470
// Toggle dropdown
464471
ctrl.toggle = function(e) {
465472
if (ctrl.open) {
466-
ctrl.close();
473+
ctrl.close();
467474
e.preventDefault();
468-
e.stopPropagation();
475+
e.stopPropagation();
469476
} else {
470477
ctrl.activate();
471478
}
@@ -654,7 +661,7 @@
654661
}
655662
if ( tagged ) {
656663
$timeout(function() {
657-
_searchInput.triggerHandler('tagged', ctrl.items);
664+
_searchInput.triggerHandler('tagged');
658665
var newItem = ctrl.search.replace(KEY.MAP[e.keyCode],'').trim();
659666
if ( ctrl.tagging.fct ) {
660667
newItem = ctrl.tagging.fct( newItem );

dist/select.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js

100644100755
+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"repository": {
77
"url": "git://github.com/angular-ui/ui-select.git"
88
},
9-
"version": "0.9.4",
9+
"version": "0.9.5",
1010
"devDependencies": {
1111
"bower": "~1.3",
1212
"del": "~0.1.1",

0 commit comments

Comments
 (0)