Bug in Loading Array Data Example (e10_2) #150

balda opened this Issue Jun 22, 2012 · 3 comments


None yet
3 participants

balda commented Jun 22, 2012

I have an error in the example "Loading Array Data" (e10_2) when i start typing:

"text is undefined" 
matcher: function(term, text) {
    return text.toUpperCase().indexOf(term.toUpperCase()) >= 0;

(line 474)

Same bug in Firefox 13 and Chrome 19 (mac versions)


ivaynberg commented Jun 22, 2012

i backported a fix into release-2.x branch. i will not planning a 2.2 release, instead i want to finish the 3.0 and release that next. if you need this in 2.x then go ahead and use the js from release-2.x branch.

ivaynberg closed this Jun 22, 2012

balda commented Jun 22, 2012

Thanks !

Not sure if we can re-open this or if I should be creating a new issue, but I'm using version 3 and still seeing the error.


Type any letter in the search field and instead of finding a match it says "Searching..." and there's this error logged:

TypeError: text is undefined
return text.toUpperCase().indexOf(term.toUpperCase()) >= 0;
select2.js (line 2377)

matcher: function(term, text) {
    return text.toUpperCase().indexOf(term.toUpperCase()) >= 0;

I'm using a hidden input field and loading the data from a variable.

I did try omitting the children / groups in the data array to see if that made any difference but no change -- ex.:

Any help is appreciated. Thanks.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment