Skip to content

Commit 3a830a2

Browse files
committed
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 select2#227
1 parent 7fd94ce commit 3a830a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@
622622
process=function(element, collection) {
623623
var group;
624624
if (element.is("option")) {
625-
if (query.matcher(term, element.text())) {
625+
if (query.matcher(term, element.text(), element)) {
626626
collection.push({id:element.attr("value"), text:element.text(), element: element.get()});
627627
}
628628
} else if (element.is("optgroup")) {

0 commit comments

Comments
 (0)