Bug in Loading Array Data Example (e10_2) #150

Closed
balda opened this Issue Jun 22, 2012 · 3 comments

Comments

Projects
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)

Contributor

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.

Demo:
https://dl.dropbox.com/u/493092/codework/jQuery/select2/test2/select2_data_test2_dest-list.html

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.:
https://dl.dropbox.com/u/493092/codework/jQuery/select2/test2/select2_data_test2_dest-list_no-children.html

Any help is appreciated. Thanks.

dustin

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