Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search tag position option #4008

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Option to show tags last in search
Fix for: createSearchChoicePosition removed in select2 4.0 withour
replacement #3420
Now there is an option to specify whether the new tag appears at the top
or bottom of the list
  • Loading branch information
stretch4x4 committed Dec 9, 2015
commit 7c6f458d06191d54a98fc8c05fc96d4e07b5852b
6 changes: 5 additions & 1 deletion src/js/select2/data/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ define([
};

Tags.prototype.insertTag = function (_, data, tag) {
data.unshift(tag);
if (this.options.options.tagsShownLast) {
data.push(tag);
} else {
data.unshift(tag);
}
};

Tags.prototype._removeOldTags = function (_) {
Expand Down