Skip to content

Commit 12b1cf2

Browse files
committed
Merge pull request #8 from hightower/bugfix/nh-enter-on-empty
Bugfix/nh enter on empty
2 parents 0c2b341 + a3ad126 commit 12b1cf2

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

dist/select.css

Lines changed: 1 addition & 1 deletion
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.12.1 - 2015-08-03T13:56:34.630Z
4+
* Version: 0.12.1 - 2015-11-02T22:37:52.574Z
55
* License: MIT
66
*/
77

dist/select.js

Lines changed: 2 additions & 2 deletions
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.12.1 - 2015-08-03T13:56:34.623Z
4+
* Version: 0.12.1 - 2015-11-02T22:37:52.566Z
55
* License: MIT
66
*/
77

@@ -480,7 +480,7 @@ uis.controller('uiSelectCtrl',
480480
if(ctrl.tagging.isActivated) {
481481
// if taggingLabel is disabled, we pull from ctrl.search val
482482
if ( ctrl.taggingLabel === false ) {
483-
if ( ctrl.activeIndex < 0 ) {
483+
if ( ctrl.activeIndex < 0 || ctrl.items.length === 0 ) {
484484
item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search;
485485
if (!item || angular.equals( ctrl.items[0], item ) ) {
486486
return;

dist/select.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/uiSelectController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ uis.controller('uiSelectCtrl',
244244
if(ctrl.tagging.isActivated) {
245245
// if taggingLabel is disabled, we pull from ctrl.search val
246246
if ( ctrl.taggingLabel === false ) {
247-
if ( ctrl.activeIndex < 0 ) {
247+
if ( ctrl.activeIndex < 0 || ctrl.items.length === 0 ) {
248248
item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search;
249249
if (!item || angular.equals( ctrl.items[0], item ) ) {
250250
return;

0 commit comments

Comments
 (0)