-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Conversation
Updating my repo
Fix for: createSearchChoicePosition removed in select2 4.0 withour replacement select2#3420 Now there is an option to specify whether the new tag appears at the top or bottom of the list
I was planning on adding this as an option at some point ( |
That sounds fair.. |
This reverts commit 7c6f458.
Now the option is the function you want run to make it more flexible
Figured out what you meant and that was much simpler than expected so have updated to that approach :) |
I've manually committed this in e842797, which is almost the exact same commit as stretch4x4@7276620. I also built out a (very basic) test for this in db5e947. |
Cheers |
This adds an option called `insertTag` that controls the location within the results where the tag is inserted. The function should take in the results array and the tag, and should modify the array in-place to add the tag to the results. This closes select2#3420 This closes select2#4008
Fixing issue #3420
Adding an option to move the location in the search list of the typed tag to the bottom.
We needed this as the users were hitting enter and saving their tag instead of the matched item.