1
0
mirror of synced 2025-02-04 14:19:23 +03:00

make the option element available to the matcher function when attached to select. can be used to match on option attributes as well as option text. fixes #227

This commit is contained in:
Igor Vaynberg 2012-07-17 16:39:28 +03:00
parent 7fd94ce623
commit 3a830a2b81

View File

@ -622,7 +622,7 @@
process=function(element, collection) { process=function(element, collection) {
var group; var group;
if (element.is("option")) { if (element.is("option")) {
if (query.matcher(term, element.text())) { if (query.matcher(term, element.text(), element)) {
collection.push({id:element.attr("value"), text:element.text(), element: element.get()}); collection.push({id:element.attr("value"), text:element.text(), element: element.get()});
} }
} else if (element.is("optgroup")) { } else if (element.is("optgroup")) {