mihirp...@gmail.com
unread,May 1, 2015, 5:28:09 AM5/1/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sel...@googlegroups.com
I want to implement tagging with select2 so i created a dropdownlist with the values. Lets say I have just 1 tag "A1" in db.
When I type "A1" then the value searched below will be highlighted. Working fine as expected but when I type "a1" then there are two values in dropdown. one is the text we searched "a1" and 2nd is "A1".
Now I want to make the search case insensitive and also if i search "a1" then "A1" which is 1st value of dropdown should be selected instead of showing the search result above the actual result.
$("#contenttags").select2({
tags: true,
placeholder: 'Select',
matcher: function (params, data) {
if ($.trim(params.term) === '') {return data;}
if (data.text.toUpperCase().indexOf(params.term.toUpperCase()) > -1) {var modifiedData = $.extend({}, data, true);return modifiedData;}
return null;
}
I tried to find a solution but can someone help me fix it to tell me how can I do it. I have also attached images.