From 8dac088bab87b8f96c7822307281cae492141d3e Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Tue, 17 Jul 2012 16:45:44 +0300 Subject: [PATCH] catch up to master --- select2-latest.html | 10 +++++++--- select2-master | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/select2-latest.html b/select2-latest.html index a23cb188..db8776dc 100755 --- a/select2-latest.html +++ b/select2-latest.html @@ -219,6 +219,7 @@ $("#e10_3").select2({
  • Dropdown will now open below or above the control depending on available screen space. No more scrolling the page to see to see all matched results.
  • Signature of formatSelection and formatResult changed in a backwards compatible way to support more powerful constructs than supported by strings alone.
  • Separator in multi-valued selects is now cofigurable, , still the default. See separator option in the docs.
  • +
  • Matching is now customizable. See matcher function in the docs and the Custom Matcher example.
  • @@ -918,15 +919,18 @@ $("#e18,#e18_2").select2(); The default implementation expects the object to have a id property that is returned. - matcherfunction + matcherfunction Used to determine whether or not the search term matches an option when a built-in query function is used. The built in query function is used when Select2 is attached to a select, or the local or tags helpers are used. -
    matcher(term, text)
    +
    matcher(term, text, option)
    - + + +
    ParameterTypeDescription
    termstringsearch term
    textstringtext of the option being matched
    <returns>booleantrue if search term matches the option text, or false otherwise
    optionjquery objectthe option element we are trying to match. Only given when attached to select. + Can be used to match against custom attributes on the option tag in addition to matching on the option's text.
    <returns>booleantrue if search term matches the text, or false otherwise
    The default implementation is case insensitive and matches anywhere in ther term: function(term, text) { return text.toUpperCase().indexOf(term.toUpperCase())>0; } diff --git a/select2-master b/select2-master index 3ed2cc09..3a830a2b 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit 3ed2cc091ac473c8610c41e5b9941939007f1e02 +Subproject commit 3a830a2b81755bd0ba754defa4899cf164f13fc7