Skip to content

Commit

Permalink
don't subtract used choices from autocomplete if allowDuplicates is true
Browse files Browse the repository at this point in the history
  • Loading branch information
aehlke committed Apr 27, 2013
1 parent d7ecf48 commit 9edda80
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
5 changes: 4 additions & 1 deletion js/tag-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@
// (Case insensitive.)
return (element.toLowerCase().indexOf(filter) === 0);
});
showChoices(this._subtractArray(choices, this.assignedTags()));
if (!this.options.allowDuplicates) {
choices = this._subtractArray(choices, this.assignedTags());
}
showChoices(choices);
};
}

Expand Down
28 changes: 14 additions & 14 deletions js/tag-it.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9edda80

Please sign in to comment.