Skip to content

Commit 497517b

Browse files
committed
Treat empty input with no choices as a tag
1 parent 0c2b341 commit 497517b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)