ソースを参照

add third param to matcher in local

vitalets 12 年 前
コミット
3570ab523e
1 ファイル変更2 行追加2 行削除
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -380,11 +380,11 @@ the specific language governing permissions and limitations under the Apache Lic
                     }
                     }
                     group.children=[];
                     group.children=[];
                     $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });
                     $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });
-                    if (group.children.length || query.matcher(t, text(group))) {
+                    if (group.children.length || query.matcher(t, text(group), datum)) {
                         collection.push(group);
                         collection.push(group);
                     }
                     }
                 } else {
                 } else {
-                    if (query.matcher(t, text(datum))) {
+                    if (query.matcher(t, text(datum), datum)) {
                         collection.push(datum);
                         collection.push(datum);
                     }
                     }
                 }
                 }